code: def dump(anno: SwaggerType, val: Code, omit_unset: Code) -> Code:
      if isinstance(anno, no_parse_types):
          return val
      if isinstance(anno, swagger_parser.Float):
          return f"dump_float({val})"
      if isinstance(anno, swagger_parser.Ref):
          assert anno.defn
          return dump(anno.defn, val, omit_unset)
      if isinstance(anno, swagger_parser.Dict):
          if not need_parse(anno):
              return val
          each = dump(anno.values, "v", omit_unset)
          return f"{{k: {each} for k, v in {val}.items()}}"
      if isinstance(anno, swagger_parser.Sequence):
          if not need_parse(anno):
              return val
          each = dump(anno.items, "x", omit_unset)
          return f"[{each} for x in {val}]"
      if isinstance(anno, swagger_parser.Class):
          return f"{val}.to_json({omit_unset})"
      if isinstance(anno, swagger_parser.Enum):
          return f"{val}.value"
      assert_never(anno)
  
imports: import os
  import typing
  import swagger_parser
  from typing_extensions import assert_never
label_desc: Use image node_id 4 for calling a global function with example usage: dump(anno, val, omit_unset) and returns: val, str, val, str, dump, str, each, str, val, str, str, each, str, val, str, val, str, omit_unset, str, val, str, val, val