code: def name(function):
      
      if isinstance(function, types.FunctionType):
          return function.__name__
      else:
          return str(function)
docs: Retrieve a pretty name for the function
      :param function: function to get name from
      :return: pretty name