def loc_to_path(obj: CWLObjectType) -> None:
    for field in ('path', 'nameext', 'nameroot', 'dirname'):
        if (field in obj):
            del obj[field]
    if cast(str, obj['location']).startswith('file://'):
        obj['path'] = uri_file_path(cast(str, obj['location']))
def loc_to_path(obj: CWLObjectType) -> None:
    for field in ('path', 'nameext', 'nameroot', 'dirname'):
        if (field in obj):
            del obj[field]
    if cast(str, obj['location']).startswith('file://'):
        obj['path'] = uri_file_path(cast(str, obj['location']))