def guess_filename(obj):
    """Tries to guess the filename of the given object."""
    name = getattr(obj, "name", None)
    if name and isinstance(name, basestring) and name[0] != "<" and name[-1] != ">":
        return os.path.basename(name)
Tries to guess the filename of the given object.
Solutions/CyberArkAudit/Data Connectors/.python_packages/lib/site-packages/requests/utils.py