def from_config(
      cls,
      positions_tag: Any,
      embedding_axis: str,
      max_wavelength: int = 10_000,
  ) -> ApplyRoPE:
    """Constructs an ``ApplyRoPE`` layer for a given axis and side input tag.

    Args:
      positions_tag: Side input tag for the position side input. This should be
        used to identify the side inputs that should receive the same position
        information. This same tag should then (usually) be passsed to the
        `pz.de.WithSideInputsFromInputTuple` handler that actually provides this
        side input.
      embedding_axis: Name of the axis that contains the embedding vector.
      max_wavelength: The maximum wavelength of the periodic positional
        embeddings.

    Returns:
      A new ``ApplyRoPE`` layer with the given configuration.
    """
    return cls(
        embedding_axis=embedding_axis,
        max_wavelength=max_wavelength,
        positions=side_input.SideInputRequest(tag=positions_tag),
    )
Constructs an ``ApplyRoPE`` layer for a given axis and side input tag.

    Args:
      positions_tag: Side input tag for the position side input. This should be
        used to identify the side inputs that should receive the same position
        information. This same tag should then (usually) be passsed to the
        `pz.de.WithSideInputsFromInputTuple` handler that actually provides this
        side input.
      embedding_axis: Name of the axis that contains the embedding vector.
      max_wavelength: The maximum wavelength of the periodic positional
        embeddings.

    Returns:
      A new ``ApplyRoPE`` layer with the given configuration.
    
penzai/deprecated/v1/nn/embeddings.py