code: def _check_y_exog(self, y, exog):
          
          y, exog = super(BaseEndogTransformer, self)._check_y_exog(y, exog)
          if y is None:
              raise ValueError("y must be non-None for endogenous transformers")
          return y, exog
docs: Check the endog and exog arrays