code: def dot(a, b):
      
      b = numpy.asarray(b)
      return numpy.dot(a, b.reshape(b.shape[0], -1)).reshape(a.shape[:-1] + b.shape[1:])
docs: Take arrays `a` and `b` and form the dot product between the last axis
      of `a` and the first of `b`.