code: def _make_tabular_predict_fn(self, labels, instance, categories):
          
  
          def _predict_fn(np_instance):
  
              df = pd.DataFrame(
                  np_instance,
                  columns=(self._categorical_columns + self._numeric_columns))
  
              # Convert categorical indices back to categories.
              for col_name, col_categories in zip(self._categorical_columns, categories):
                  df[col_name] = df[col_name].apply(lambda x: col_categories[int(x)])
  
              # Add columns that do not exist in the perturbed data,
              # such as key, text, and image data.
              for col_name in self._headers:
                  if col_name not in (self._categorical_columns + self._numeric_columns):
                      df[col_name] = instance[col_name]
  
              r = _local_predict.get_prediction_results(
                  self._model_dir, df, self._headers, with_source=False)
              probs = _local_predict.get_probs_for_labels(labels, r)
              probs = np.asarray(probs)
              return probs
  
          return _predict_fn
docs: Create a predict_fn that can be used by LIME tabular explainer.