code: def uniqued(layer: Model, *, column: int = 0) -> Model[InT, OutT]:
      """Group inputs to a layer, so that the layer only has to compute for the
      unique values. The data is transformed back before output, and the same
      transformation is applied for the gradient. Effectively, this is a cache
      local to each minibatch.
      """
      return Model(
          f"uniqued({layer.name})",
          forward,
          init=init,
          layers=[layer],
          dims={"nO": None, "nI": None},
          attrs={"column": column},
      )
  
imports: from typing import Callable, Optional, Tuple
  import numpy
  from ..config import registry
  from ..model import Model
  from ..types import Floats2d, Ints2d
label_desc: Use image node_id 1 for calling a global function with example usage: uniqued(layer) and returns: Model