code: def _to_predictor(self, pred_parameter=None):
          
          predictor = _InnerPredictor(booster_handle=self.handle, pred_parameter=pred_parameter)
          predictor.pandas_categorical = self.pandas_categorical
          return predictor
docs: Convert to predictor.