def tag(self, *names) -> NamedArray:
    """Attaches names to the positional axes of an array or view.

    Args:
      *names: Axis names to assign to each positional axis in the array or view.
        Must be the same length as `positional_shape`; if you only want to tag a
        subset of axes, use `tag_prefix` instead.

    Raises:
      ValueError: If the names are invalid, or if they aren't the same length
        as `positional_shape`.

    Returns:
      A NamedArray with the given names assigned to the positional axes, and no
      remaining positional axes.
    """
Attaches names to the positional axes of an array or view.

    Args:
      *names: Axis names to assign to each positional axis in the array or view.
        Must be the same length as `positional_shape`; if you only want to tag a
        subset of axes, use `tag_prefix` instead.

    Raises:
      ValueError: If the names are invalid, or if they aren't the same length
        as `positional_shape`.

    Returns:
      A NamedArray with the given names assigned to the positional axes, and no
      remaining positional axes.
    
penzai/core/named_axes.py