code: def name(object):
      "Try to find some reasonable name for the object."
      return (getattr(object, 'name', 0) or getattr(object, '__name__', 0)
              or getattr(getattr(object, '__class__', 0), '__name__', 0)
              or str(object)f name(object):
      "Try to find some reasonable name for the object."
      return (getattr(object, 'name', 0) or getattr(object, '__name__', 0)
              or getattr(getattr(object, '__class__', 0), '__name__', 0)
              or str(object))
docs: Try to find some reasonable name for the object.