def get_filename(file):
    name = getattr(file, 'name', None)
    if name and not (name.endswith('>') and name.startswith('<')):
        return name
dataset/ETHPy150Open ecdavis/pants/pants/http/utils.py/get_filename/original