code: def residual(layer: Model[InT, InT]) -> Model[InT, InT]:
      return Model(
          f"residual({layer.name})",
          forward,
          init=init,
          layers=[layer],
          dims={
              "nO": layer.get_dim("nO")
              if layer.has_dim("nO")
              else None,
              "nI": layer.get_dim("nI")
              if layer.has_dim("nI")
              else None,
          },
      )
  
imports: from typing import Callable, List, Optional, Tuple, TypeVar
  from ..config import registry
  from ..model import Model
  from ..types import Floats1d, Floats2d, Floats3d, Floats4d, FloatsXd, Padded, Ragged
label_desc: Use image node_id 1 for calling a global function with example usage: residual(layer) and returns: Model