code: def explain_text(self, labels, instance, column_name=None, num_features=10, num_samples=5000):
          
  
          from lime.lime_text import LimeTextExplainer
  
          if len(self._text_columns) > 1 and not column_name:
              raise ValueError('There are multiple text columns in the input of the model. ' +
                               'Please specify "column_name".')
          elif column_name and column_name not in self._text_columns:
              raise ValueError('Specified column_name "%s" not found in the model input.'
                               % column_name)
  
          text_column_name = column_name if column_name else self._text_columns[0]
          if isinstance(instance, six.string_types):
              instance = next(csv.DictReader([instance], fieldnames=self._headers))
  
          predict_fn = self._make_text_predict_fn(labels, instance, text_column_name)
          explainer = LimeTextExplainer(class_names=labels)
          exp = explainer.explain_instance(
              instance[text_column_name], predict_fn, labels=range(len(labels)),
              num_features=num_features, num_samples=num_samples)
          return exp
docs: Explain a text field of a prediction.
  
          It analyze the prediction by LIME, and returns a report of which words are most impactful
          in contributing to certain labels.
  
          Args:
            labels: a list of labels to explain.
            instance: the prediction instance. It needs to conform to model's input. Can be a csv
                line string, or a dict.
            column_name: which text column to explain. Can be None if there is only one text column
                in the model input.
            num_features: maximum number of words (features) to analyze. Passed to
                LIME LimeTextExplainer directly.
            num_samples: size of the neighborhood to learn the linear model. Passed to
                LIME LimeTextExplainer directly.
  
          Returns:
            A LIME's lime.explanation.Explanation.
  
          Throws:
            ValueError if the given text column is not found in model input or column_name is None
                but there are multiple text columns in model input.