code: def get_jsonld(head, rel, tail, url):
      doc = {
          "@id": head,
          url: {"@id": tail},
      }
      context = {rel: url}
      compacted = jsonld.compact(doc, context)
      logger.info(json.dumps(compacted, indent=2, ensure_ascii=False))
  
file_path: DeepKE/example/triple/cnschema/predict.py
imports: import hydra
  import os
  import torch
  import logging
  from hydra import utils
  import json
  from pyld import jsonld
  from preprocess import _handle_relation_data, _lm_serialize
  from utils import load_csv
  from LMModel import LM
  from InferBert import InferNer
label_desc: Use image node_id 2 for calling a global function with example usage: get_jsonld(head, rel, tail, url) without return types