def load_report_from_temp_storage(identifier: str) -> Session:
    """
    Returns the session referred to by identifier
    """
    path = os.path.join(report_dir(), identifier + ".pyisession")
    try:
        return Session.load(path)
    except FileNotFoundError:
        sys.exit(f"pyinstrument: Couldn't find a profile with identifier {identifier}")

    Returns the session referred to by identifier
    
pyinstrument/__main__.py