code: def _broadcast_arithmetic(op):
      
      def _broadcast_arithmetic_impl(self, other):
          if (self.space.is_power_space and other in self.space[0]):
              results = []
              for xi in self:
                  res = getattr(xi, op)(other)
                  if res is NotImplemented:
                      return NotImplemented
                  else:
                      results.append(res)
  
              return self.space.element(results)
          else:
              return getattr(LinearSpaceElement, op)(self, other)
  
      # Set docstring
      docstring = """Broadcasted {op}.""".format(op=op)
      _broadcast_arithmetic_impl.__doc__ = docstring
  
      return _broadcast_arithmetic_impl
docs: Return ``op(self, other)`` with broadcasting.
  
      Parameters
      ----------
      op : string
          Name of the operator, e.g. ``'__add__'``.
  
      Returns
      -------
      broadcast_arithmetic_op : function
          Function intended to be used as a method for `ProductSpaceVector`
          which performs broadcasting if possible.
  
      Notes
      -----
      Broadcasting is the operation of "applying an operator multiple times" in
      some sense. For example:
  
      .. math::
          (1, 2) + 1 = (2, 3)
  
      is a form of broadcasting. In this implementation, we only allow "single
      layer" broadcasting, i.e., we do not support broadcasting over several
      product spaces at once.