code: def as_enum(d):
      if "__enum__" in d:
          name, member = d["__enum__"].split(".")
          return getattr(PUBLIC_ENUMS[name], member)
      else:
          return d
  
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 2 for calling a global function with example usage: as_enum(d) and returns: getattr, d