code: def default(self, o):
      if has_numpy:
          if isinstance(o, np.integer):
              return int(o)
          elif isinstance(o, np.floating):
              return float(o)
          elif isinstance(o, np.ndarray):
              return o.tolist()
      if _is_torch_tensor(o):
          return o.detach().tolist()
      if _is_tensorflow_tensor(o):
          return o.numpy().tolist()
      return json.JSONEncoder.default(self, o)
  
imports: import json
label_desc: Use image node_id 1 for calling the CustomJSONEncoder obj's underlying member method code with example usage: obj.default(o) and returns: json, o, o, int, float, o