def create_loader(ctx): loader = Loader() url_fields = [] for c in ctx: if c != "id" and (ctx[c] == "@id") or (isinstance(ctx[c], dict) and ctx[c].get("@type") == "@id"): url_fields.append(c) loader.url_fields = url_fields loader.idx["cwl:JsonPointer"] = {} return loader