def _generate_binary_deferer(op_func):
  """
  Given a binary operator, generate a method that applies that operator
  element-wise to a self and an other. See
  ReplicatedThinMatrices._defer_binary_elementwise for more.
  """

  def deferer(self, other, *args, **kwargs):
    return type(self)._defer_binary_elementwise(
        self,
        other,
        op_func,
        *args,
        **kwargs,
    )

  return deferer