code: def _transform(vmodel, tmodel, x):
      split = np.cumsum([len(xi) for xi in x])[:-1]
      if vmodel is not None:
          x = np.vsplit(
              vmodel.transform(np.vstack(x).ravel()).toarray(), split
          )
      if tmodel is not None:
          if isinstance(tmodel, Pipeline):
              x = np.vsplit(
                  tmodel.transform(np.vstack(x).ravel()), split
              )
          else:
              x = np.vsplit(tmodel.transform(np.vstack(x)), split)
      return [xi for xi in x]
  
file_path: hypertools/hypertools/tools/text2mat.py
imports: import numpy
  import inspect
  from sklearn.feature_extraction.text import CountVectorizer, TfidfVectorizer
  from sklearn.decomposition import LatentDirichletAllocation, NMF
  from sklearn.utils.validation import check_is_fitted
  from sklearn.exceptions import NotFittedError
  from sklearn.pipeline import Pipeline
  from .._shared.helpers import memoize
  from .._shared.params import default_params
  from .load import load
label_desc: Use image node_id 2 for calling a global function with example usage: _transform(vmodel, tmodel, x) and returns: unknown