Repository: aeon-toolkit/aeon (python)

Issue:
[BUG] BaseSeriesTransformer has no _check_y
### Describe the bug

the base class series transformer calls a method _check_y which does not exist

### Steps/Code to reproduce the bug

```python
    @final
    def fit(self, X, y=None, axis=1):
        """Fit transformer to X, optionally using y if supervised.

        State change:
            Changes state to "fitted".

        Parameters
        ----------
        X : Input data
            Time series to fit transform to, of type ``np.ndarray``, ``pd.Series``
            ``pd.DataFrame``.
        y : Target variable, default=None
            Additional data, e.g., labels for transformation
        axis : int, default = 1
            Axis of time in the input series.
            If ``axis == 0``, it is assumed each column is a time series and each row is
            a time point. i.e. the shape of the data is ``(n_timepoints,
            n_channels)``.
            ``axis == 1`` indicates the time series are in rows, i.e. the shape of
            the data is ``(n_channels, n_timepoints)`.``axis is None`` indicates
            that the axis of X is the same as ``self.axis``.

        Returns
        -------
        self : a fitted instance of the estimator
        """
        # skip the rest if fit_is_empty is True
        if self.get_tag("fit_is_empty"):
            self._is_fitted = True
            return self
        if self.get_tag("requires_y"):
            if y is None:
                raise ValueError("Tag requires_y is true, but fit called with y=None")
        # reset estimator at the start of fit
        self.reset()
        X = self._preprocess_series(X, axis=axis, store_metadata=True)
        if y is not None:
            self._check_y(y)
        self._fit(X=X, y=y)
        self._is_fitted = True
        return self
```


### Expected results

function exists

### Actual results

no function exists

### Versions

_No response_

Pull request:
[BUG] add check y to BaseSeriesTransformer
fixes #1623 

adds a simple check function for y if passed, requires it to be a pd.Series or numpy array and does nothing more. Expanded test to call it,

Patch:
diff --git a/aeon/transformations/series/base.py b/aeon/transformations/series/base.py
index b2a64ea4..83a0e112 100644
--- a/aeon/transformations/series/base.py
+++ b/aeon/transformations/series/base.py
@@ -11,6 +11,9 @@ fit & transform - fit_transform(self, X, y=None)
 from abc import ABCMeta, abstractmethod
 from typing import final
 
+import numpy as np
+import pandas as pd
+
 from aeon.base import BaseSeriesEstimator
 from aeon.transformations.base import BaseTransformer
 
@@ -76,7 +79,7 @@ class BaseSeriesTransformer(BaseSeriesEstimator, BaseTransformer, metaclass=ABCM
         return self
 
     @final
-    def transform(self, X, axis=1):
+    def transform(self, X, y=None, axis=1):
         """Transform X and return a transformed version.
 
         State required:
@@ -349,3 +352,12 @@ class BaseSeriesTransformer(BaseSeriesEstimator, BaseTransformer, metaclass=ABCM
             return Xt
         else:
             return Xt.T
+
+    def _check_y(self, y):
+        # Check y valid input for supervised transform
+        if not isinstance(y, (pd.Series, np.ndarray)):
+            raise TypeError(
+                f"y must be a np.array or a pd.Series, but found type: {type(y)}"
+            )
+        if isinstance(y, np.ndarray) and y.ndim > 1:
+            raise TypeError(f"y must be 1-dimensional, found {y.ndim} dimensions")


Test patch:
diff --git a/aeon/transformations/series/tests/test_base.py b/aeon/transformations/series/tests/test_base.py
index 3320beba..76aed38f 100644
--- a/aeon/transformations/series/tests/test_base.py
+++ b/aeon/transformations/series/tests/test_base.py
@@ -43,8 +43,13 @@ def test_fit_transform_univariate():
     transformer = MockUnivariateSeriesTransformer()
     x2 = transformer.fit_transform(x1)
     assert x1.shape == x2.shape
+    x2 = transformer.fit_transform(x1, x2)
     x3 = np.array([[10, 9, 8, 7, 6, 5, 4, 3, 2, 1]])
     x4 = transformer.fit_transform(x3)
     assert isinstance(x4, np.ndarray) and x4.ndim == 1
     with pytest.raises(ValueError, match="Multivariate data not supported"):
         transformer.fit_transform(np.random.rand(2, 10))
+    transformer.fit(x1, x2)
+    x3 = transformer.transform(x1, x2)
+    x4 = transformer.fit_transform(x1, x2)
+    np.testing.assert_array_almost_equal(x3, x4)