code: def text_classifier(
      name,
      train_data,
      preproc=None,
      multilabel=None,
      metrics=None,
      verbose=1,
  ):
      """
      ```
      Build and return a text classification model.
  
      Args:
          name (string): one of:
                        - 'fasttext' for FastText model
                        - 'nbsvm' for NBSVM model
                        - 'logreg' for logistic regression using embedding layers
                        - 'bigru' for Bidirectional GRU with pretrained word vectors
                        - 'bert' for BERT Text Classification
                        - 'distilbert' for Hugging Face DistilBert model
  
          train_data (tuple): a tuple of numpy.ndarrays: (x_train, y_train) or ktrain.Dataset instance
                              returned from one of the texts_from_* functions
          preproc: a ktrain.text.TextPreprocessor instance.
                   As of v0.8.0, this is required.
          multilabel (bool):  If True, multilabel model will be returned.
                              If false, binary/multiclass model will be returned.
                              If None, multilabel will be inferred from data.
          metrics(list): List of metrics to use.  If None: 'accuracy' is used for binar/multiclassification,
                         'binary_accuracy' is used for multilabel classification, and 'mae' is used for regression.
          verbose (boolean): verbosity of output
      Return:
          model (Model): A Keras Model instance
      ```
      """
      if name not in TEXT_CLASSIFIERS:
          raise ValueError(
              "invalid name for text classification: %s" % (name)
          )
      if preproc is not None and not preproc.get_classes():
          raise ValueError(
              "preproc.get_classes() is empty, but required for text classification"
          )
      return _text_model(
          name,
          train_data,
          preproc=preproc,
          multilabel=multilabel,
          classification=True,
          metrics=metrics,
          verbose=verbose,
      )
  
file_path: ktrain/ktrain/text/models.py
imports: from ..None import utils
  from ..imports import *
  from .None import preprocessor
label_desc: Use image node_id 13 for calling a global function with example usage: text_classifier(name, train_data, preproc, multilabel, metrics, verbose) and returns: _text_model