def METHOD_NAME(file):
    try:
        pretrain_state_dict = torch.load(file)
    except AssertionError:
        pretrain_state_dict = torch.load(
            file, map_location=lambda storage, location: storage
        )
    return pretrain_state_dict