def isfunction(object):
 return isinstance(object, types.FunctionType)

def isfunction ( object ) : return isinstance ( object , types . FunctionType )
return true if the object is a user-defined function .