code: def distance(self, x, y):
          
          if scipy.sparse.issparse(x):
              return numpy.sum(numpy.absolute((x-y).toarray().ravel()))
          else:
              return numpy.sum(numpy.absolute(x-y))
docs: Computes the Manhattan distance between vectors x and y. Returns float.