code: def determine_name(func):
      
      if hasattr(func, '__name__'):
          return func.__name__
      elif hasattr(func, '__class__'):
          return func.__class__.__name__
  
      # This shouldn't be possible, but blow up if so.
      raise AttributeError("Provided callable '{}' has no name.".format(
          func
      ))
docs: Given a function, returns the name of the function.
  
      Ex::
  
          from random import choice
          determine_name(choice) # Returns 'choice'
  
      :param func: The callable
      :type func: function
  
      :returns: Name string