code: def default(self, obj: Union[FeatureType, DType]) -> Dict[str, str]:
      if type(obj) in PUBLIC_ENUMS.values():
          return {"__enum__": str(obj)}
      return json.JSONEncoder.default(self, obj)
  
imports: from collections import namedtuple
  from io import BytesIO
  import numpy
  from itertools import chain, islice
  from enum import Enum
  import json
  from bigdl.dllib.utils.log4Error import *
  from typing import Any, Dict, Iterator, List, Union, TYPE_CHECKING
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