code: def flatten_fun_nokwargs2(in_tree, *args_flat):
      py_args = tree_unflatten(in_tree, args_flat)
      pair = yield py_args, {}
      if not isinstance(pair, (list, tuple)) or len(pair) != 2:
          raise TypeError(
              "expected function with aux output to return a two-element "
              f"tuple, but got type {type(pair)} with value {pair!r}"
          )
      ans, aux = pair
      ans_flat, ans_tree = tree_flatten(ans)
      aux_flat, aux_tree = tree_flatten(aux)
      yield (ans_flat, aux_flat), (ans_tree, aux_tree)
  
imports: from __future__ import annotations
  from collections.abc import Iterable, Sequence
  import inspect
  import operator
  from functools import partial
  from typing import Any, Callable
  import warnings
  import numpy
  from jax._src import core
  from jax._src import dtypes
  from jax._src.abstract_arrays import numpy_scalar_types
  from jax._src.core import ShapedArray
  from jax._src.tree_util import PyTreeDef, tree_flatten, tree_unflatten, tree_map, tree_structure, treedef_children, generate_key_paths, keystr, broadcast_prefix, prefix_errors
  from jax._src.tree_util import _replace_nones
  from jax._src import linear_util
  from jax._src.linear_util import TracingDebugInfo
  from jax._src.util import safe_map, WrapKwArgs, Hashable, HashableFunction, Unhashable
  from jax._src import traceback_util
label_desc: Use image node_id 10 for calling a global function with example usage: flatten_fun_nokwargs2(in_tree) without return types