code: def _preprocess(info, args, kwargs, return_static: bool = False):
      (
          signature,
          dynamic_fun,
          static_fun,
          donate_first,
          donate_rest,
      ) = info
      args, kwargs = _bind(signature, args, kwargs)
      # add dummy to avoid special casing `len(args) == 0`.
      args = args + (None,)
      first_arg = args[0]
      rest_args = args[1:]
      if return_static:
          dynamic_first, static_first = hashable_partition(
              first_arg, is_array
          )
          dynamic_rest, static_rest = hashable_partition(
              (rest_args, kwargs), is_array
          )
      else:
          dynamic_first = hashable_filter(first_arg, is_array)
          dynamic_rest = hashable_filter((rest_args, kwargs), is_array)
      dynamic_donate = dict()
      dynamic_nodonate = dict()
      if donate_first:
          dynamic_donate["first"] = dynamic_first
      else:
          dynamic_nodonate["first"] = dynamic_first
      if donate_rest:
          dynamic_donate["fun"] = dynamic_fun
          dynamic_donate["rest"] = dynamic_rest
      else:
          dynamic_nodonate["fun"] = dynamic_fun
          dynamic_nodonate["rest"] = dynamic_rest
  
      if return_static:
          static = (
              static_fun,
              static_first,
              static_rest,
          )  # pyright: ignore
          return dynamic_donate, dynamic_nodonate, static
      else:
          return dynamic_donate, dynamic_nodonate
  
imports: import functools
  import inspect
  import warnings
  from collections.abc import Callable
  from typing import Any, Literal, overload, TypeVar
  from typing_extensions import ParamSpec
  import jax
  import jax._src.traceback_util
  import jax.core
  from jaxtyping import PyTree
  from ._compile_utils import compile_cache, get_fn_names, hashable_combine, hashable_filter, hashable_partition, Lowered
  from ._custom_types import sentinel
  from ._deprecate import deprecated_0_10
  from ._doc_utils import doc_remove_args
  from ._filters import combine, is_array, partition
  from ._module import field, Module, module_update_wrapper, Partial, Static
label_desc: Use image node_id 3 for calling a global function with example usage: _preprocess(info, args, kwargs, return_static) and returns: dynamic_donate,  dynamic_nodonate,  static, dynamic_donate,  dynamic_nodonate