code: def _test_transformed_return_values(tree, method_name):
      """Tests whether the return value contains any Modules or Variables."""
      impure = any(
          map(
              lambda x: isinstance(x, (Module, Variable)),
              jax.tree_util.tree_leaves(tree),
          )
      )
      if impure:
          raise errors.TransformedMethodReturnValueError(method_name)
  
imports: import dataclasses
  import functools
  import inspect
  from typing import Any, Callable, Dict, Iterable, Mapping, Optional, Sequence, Tuple, Type, TypeVar, Union
  from flax import errors, struct, traceback_util
  from flax.core import Scope, lift, meta
  from flax.core.frozen_dict import FrozenDict
  from flax.linen import module
  from flax.linen.module import Module, Variable, _derive_profiling_name, _get_unbound_fn, wrap_method_once
  import jax
label_desc: Use image node_id 5 for calling a global function with example usage: _test_transformed_return_values(tree, method_name) without return types