code: def default(self, obj):
      if type(obj) in PUBLIC_ENUMS.values():
          return {"__enum__": str(obj)}
      return json.JSONEncoder.default(self, obj)
  
imports: import copy
  import os
  from collections import namedtuple
  from io import BytesIO
  import numpy
  import pyarrow
  from itertools import chain, islice
  from enum import Enum
  import json
label_desc: Use image node_id 1 for calling the EnumEncoder obj's underlying member method code with example usage: obj.default(obj) and returns: json, dict