code: def _flatten_mesh(self, Xs, term):
          
          n = Xs[0].size
  
          if self.terms[term].istensor:
              terms = self.terms[term]
          else:
              terms = [self.terms[term]]
  
          X = np.zeros((n, self.statistics_['m_features']))
          for term_, x in zip(terms, Xs):
              X[:, term_.feature] = x.ravel()
          return X
docs: flatten the mesh and distribute into a feature matrix