code: def default(self, obj):
      if isinstance(obj, np.integer):
          return int(obj)
      elif isinstance(obj, np.floating):
          return float(obj)
      elif isinstance(obj, np.ndarray):
          return obj.tolist()
      elif isinstance(obj, WhitespaceNLP.Doc):
          return repr(obj)
      elif isinstance(obj, AsianNLP.Doc):
          return repr(obj)
      elif "spacy" in sys.modules:
          import spacy
  
          if isinstance(obj, spacy.tokens.doc.Doc):
              return repr(obj)
      else:
          return super(MyEncoder, self).default(obj)
  
file_path: scattertext/scattertext/viz/VizDataAdapter.py
imports: import json
  import sys
  import numpy
  from scattertext import AsianNLP, WhitespaceNLP
label_desc: Use image node_id 1 for calling the MyEncoder obj's underlying member method code with example usage: obj.default(obj) and returns: int, float, obj, repr, repr, super, repr