code: def lift_transform(
      transform, target, *trafo_args, methods=None, **trafo_kwargs
  ):
      """Applies to class or as a decorator on class fns."""
      # TODO(marcvanzee): Improve docstrings (#1977).
      if _is_module_class(target):
          return module_class_lift_transform(
              transform,
              target,
              *trafo_args,
              methods=methods,
              **trafo_kwargs,
          )
      # we presume this is being used as a function decorator in class definition
      elif callable(target) and not isinstance(target, Module):
          return decorator_lift_transform(
              transform, target, *trafo_args, **trafo_kwargs
          )
      else:
          raise errors.TransformTargetError(target)
  
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 9 for calling a global function with example usage: lift_transform(transform, target) and returns: module_class_lift_transform, decorator_lift_transform