code: def _mom(self, key, left, right, cache):
          
          if evaluation.get_dependencies(left, right):
              raise evaluation.DependencyError(
                  "sum of dependent distributions not feasible: "
                  "{} and {}".format(left, right)
              )
  
          if isinstance(left, Dist):
              left = evaluation.evaluate_moment(left, key, cache=cache)
          else:
              left = (numpy.array(left).T**key).T
          if isinstance(right, Dist):
              right = evaluation.evaluate_moment(right, key, cache=cache)
          else:
              right = (numpy.array(right).T**key).T
          return numpy.sum(left*right)
docs: Statistical moments.
  
          Example:
              >>> print(numpy.around(chaospy.Uniform().mom([0, 1, 2, 3]), 4))
              [1.     0.5    0.3333 0.25  ]
              >>> print(numpy.around(Mul(chaospy.Uniform(), 2).mom([0, 1, 2, 3]), 4))
              [1.     1.     1.3333 2.    ]
              >>> print(numpy.around(Mul(2, chaospy.Uniform()).mom([0, 1, 2, 3]), 4))
              [1.     1.     1.3333 2.    ]
              >>> print(numpy.around(Mul(chaospy.Uniform(), chaospy.Uniform()).mom([0, 1, 2, 3]), 4))
              [1.     0.25   0.1111 0.0625]
              >>> print(numpy.around(Mul(2, 2).mom([0, 1, 2, 3]), 4))
              [ 1.  4. 16. 64.]