code: def default(self, obj):
      if isinstance(obj, np.ndarray):
          return _serialize_buffer(obj, array_serialization="base64")
      elif isinstance(obj, np.generic):
          return obj.item()
  
      return json.JSONEncoder.default(self, obj)
  
imports: import base64
  import logging
  import sys
  import inspect
  import re
  import traceback
  import json
  from functools import partial
  import numpy
label_desc: Use image node_id 1 for calling the NumPyJSONEncoder obj's underlying member method code with example usage: obj.default(obj) and returns: json, _serialize_buffer, obj