code: def fileobj_name(fileobj):
      
  
      value = getattr(fileobj, "name", u"")
      if not isinstance(value, (text_type, bytes)):
          value = text_type(value)
      return value
docs: Returns:
          text: A potential filename for a file object. Always a valid
              path type, but might be empty or non-existent.