code: def _output_to_dict(output):
      if isinstance(output, dict):
          return output
  
      if hasattr(output, "asdict"):
          return output.asdict()
  
      if hasattr(output, "_asdict"):
          return output._asdict()
  
      if isinstance(output, types.GeneratorType):
          return (_output_to_dict(out) for out in output)
  
      raise ValueError(type(output))
  
imports: from collections import namedtuple
  import functools
  import inspect
  import operator
  import types
  from typing import Any, Callable, Iterable, Optional, Sequence, Sized, TypeVar, Union
  import warnings
  import jax
  from jax import core
  from jax import random
  import jax.numpy
  from jax.tree_util import tree_all
  from jax.tree_util import tree_map
  import numpy
label_desc: Use image node_id 7 for calling a global function with example usage: _output_to_dict(output) and returns: output, output, output, unknown