code: def save_json(
      obj,
      fname,
      sort_keys=True,
      indent=4,
      separators=None,
      encoder=ComplexEncoder,
      *args,
      **kwargs,
  ):
      with open(fname, "w") as fd:
          json.dump(
              obj,
              fd,
              indent=indent,
              sort_keys=sort_keys,
              cls=encoder,
              separators=separators,
              *args,
              **kwargs,
          )
  
file_path: gluon-cv/gluoncv/torch/data/gluoncv_motion_dataset/utils/serialization_utils.py
imports: import json
  import pickle
  import pathlib
  import numpy
label_desc: Use image node_id 2 for calling a global function with example usage: save_json(obj, fname, sort_keys, indent, separators, encoder) without return types