code: def json_converter(obj):
      """Helper function to convert object to json."""
      try:
          return obj.to_json()
      except AttributeError:
          if isinstance(obj, np.generic):
              return obj.item()
          return obj.__dict__
  
imports: import copy
  import json
  import math
  import numpy
  import pandas
  from dice_ml.constants import ModelTypes, _SchemaVersions
  from dice_ml.utils.serialize import DummyDataInterface
label_desc: Use image node_id 1 for calling a global function with example usage: json_converter(obj) and returns: obj, obj, obj