code: def _to_odm_color_scheme(color_scheme: ColorSchemeInput):
      return foo.ColorScheme(
          color_pool=color_scheme.color_pool,
          color_by=color_scheme.color_by,
          multicolor_keypoints=color_scheme.multicolor_keypoints,
          opacity=color_scheme.opacity,
          show_skeletons=color_scheme.show_skeletons,
          default_mask_targets_colors=[
              asdict(f)
              for f in color_scheme.default_mask_targets_colors
          ]
          if color_scheme.default_mask_targets_colors
          else [],
          fields=[asdict(f) for f in color_scheme.fields]
          if color_scheme.fields
          else [],
          colorscales=[asdict(f) for f in color_scheme.colorscales]
          if color_scheme.colorscales
          else [],
          label_tags=asdict(color_scheme.label_tags)
          if color_scheme.label_tags
          else {},
          default_colorscale=asdict(color_scheme.default_colorscale)
          if color_scheme.default_colorscale
          else {},
      )
  
imports: from dataclasses import asdict
  from enum import Enum
  import typing
  from bson import ObjectId
  import strawberry
  import fiftyone
  import fiftyone.core.session.events
  import fiftyone.core.odm
  import fiftyone.core.utils
  from fiftyone.server.events import dispatch_event, get_state
  from fiftyone.server.utils import from_dict
label_desc: Use image node_id 1 for calling a global function with example usage: _to_odm_color_scheme(color_scheme) and returns: foo