def _swapped_binop(binop):
  """Swaps the order of operations for a binary operation."""

  def swapped(x, y):
    return binop(y, x)

  return swapped
Swaps the order of operations for a binary operation.
penzai/core/named_axes.py