Return True if the object is a Python function, which includes functions created by a lambda expression.
inspect.isfunction(object)