<human>:  to check if object doesnt have attribute variable.
<bot>: Here is a Python function to check if an object doesn't have an attribute variable

import sys

def has_attr(obj, attr):
  """Checks if object has attribute.

  :param obj:
  :param attr:
  :rtype: bool
  :return:
  """
  return hasattr(obj, attr)

# Enter the function name
function_name = "memory_used"

# Calling the function
print((has_attr(function_name, "memory_used")))

#Example Output
# False

#Remember to inspect code for bugs.