We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[BUG] `temporal_train_test_split` does not work on panel datatypes with unequal length series.
**Describe the bug**
<!--
A clear and concise description of what the bug is.
-->
Also relates to #4968 

`temporal_train_test_split` wrongly split panel datatypes (splitting per unique unequal  time series). It could be that the split function does not support this type yet, If so, it should throw an error msg telling that it does not currently supported the datatypes.

**To Reproduce**
<!--
Add a Minimal, Complete, and Verifiable example (for more details, see e.g. https://stackoverflow.com/help/mcve

If the code is too long, feel free to put it in a public gist and link it in the issue: https://gist.github.com
-->

```python
from sktime.forecasting.model_selection import temporal_train_test_split
from sktime.utils._testing.panel import _make_panel

y = _make_panel(n_instances=2, n_timepoints=6)
# make first instance series shorter than the second
y.iloc[4:6] =None
y.dropna(inplace=True)

train_size, test_size = temporal_train_test_split(y,  test_size=2) 
# show shapes
print(
    f"""
    {y.shape=} 
    {train_size.shape=}, {test_size.shape=} #train size should be (6,1) 2+4=6
    """
)

# has also the same issue as #4968 below is the minimal example
train_fh, test_fh = temporal_train_test_split(y,  fh=[1,2]) 
# show shapes
print(
    f"""
    {y.shape=} 
    {train_fh.shape=}, {test_fh.shape=} #train size should be (6,1) and test (4,1)
   """
)
```

output
```
y.shape=(10, 1) 
train_size.shape=(4, 1), test_size.shape=(4, 1) #train size should be 6 (2+4)

y.shape=(10, 1) 
train_fh.shape=(8, 1), test_fh.shape=(2, 1) #train size should be (6,1) and test (4,1)
```

**Versions**
<details>

<!--
Please run the following code snippet and paste the output here:

from sktime import show_versions; show_versions()
-->
 main at [3cf69ed](https://github.com/sktime/sktime/commit/3cf69eddba315d6130b661ca5fe8e132e236aa47)

</details>

<!-- Thanks for contributing! -->


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `sktime/split/__init__.py`
Content:
```
1 """Module for splitters."""
2 
3 __all__ = [
4     "CutoffSplitter",
5     "ExpandingGreedySplitter",
6     "ExpandingWindowSplitter",
7     "SameLocSplitter",
8     "SingleWindowSplitter",
9     "SlidingWindowSplitter",
10     "TestPlusTrainSplitter",
11     "temporal_train_test_split",
12 ]
13 
14 from sktime.split.cutoff import CutoffSplitter
15 from sktime.split.expandinggreedy import ExpandingGreedySplitter
16 from sktime.split.expandingwindow import ExpandingWindowSplitter
17 from sktime.split.sameloc import SameLocSplitter
18 from sktime.split.singlewindow import SingleWindowSplitter
19 from sktime.split.slidingwindow import SlidingWindowSplitter
20 from sktime.split.temporal_train_test_split import temporal_train_test_split
21 from sktime.split.testplustrain import TestPlusTrainSplitter
22
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/sktime/split/__init__.py b/sktime/split/__init__.py
--- a/sktime/split/__init__.py
+++ b/sktime/split/__init__.py
@@ -7,6 +7,7 @@
     "SameLocSplitter",
     "SingleWindowSplitter",
     "SlidingWindowSplitter",
+    "TemporalTrainTestSplitter",
     "TestPlusTrainSplitter",
     "temporal_train_test_split",
 ]
@@ -17,5 +18,8 @@
 from sktime.split.sameloc import SameLocSplitter
 from sktime.split.singlewindow import SingleWindowSplitter
 from sktime.split.slidingwindow import SlidingWindowSplitter
-from sktime.split.temporal_train_test_split import temporal_train_test_split
+from sktime.split.temporal_train_test_split import (
+    TemporalTrainTestSplitter,
+    temporal_train_test_split,
+)
 from sktime.split.testplustrain import TestPlusTrainSplitter

{"golden_diff": "diff --git a/sktime/split/__init__.py b/sktime/split/__init__.py\n--- a/sktime/split/__init__.py\n+++ b/sktime/split/__init__.py\n@@ -7,6 +7,7 @@\n     \"SameLocSplitter\",\n     \"SingleWindowSplitter\",\n     \"SlidingWindowSplitter\",\n+    \"TemporalTrainTestSplitter\",\n     \"TestPlusTrainSplitter\",\n     \"temporal_train_test_split\",\n ]\n@@ -17,5 +18,8 @@\n from sktime.split.sameloc import SameLocSplitter\n from sktime.split.singlewindow import SingleWindowSplitter\n from sktime.split.slidingwindow import SlidingWindowSplitter\n-from sktime.split.temporal_train_test_split import temporal_train_test_split\n+from sktime.split.temporal_train_test_split import (\n+    TemporalTrainTestSplitter,\n+    temporal_train_test_split,\n+)\n from sktime.split.testplustrain import TestPlusTrainSplitter\n", "issue": "[BUG] `temporal_train_test_split` does not work on panel datatypes with unequal length series.\n**Describe the bug**\r\n<!--\r\nA clear and concise description of what the bug is.\r\n-->\r\nAlso relates to #4968 \r\n\r\n`temporal_train_test_split` wrongly split panel datatypes (splitting per unique unequal  time series). It could be that the split function does not support this type yet, If so, it should throw an error msg telling that it does not currently supported the datatypes.\r\n\r\n**To Reproduce**\r\n<!--\r\nAdd a Minimal, Complete, and Verifiable example (for more details, see e.g. https://stackoverflow.com/help/mcve\r\n\r\nIf the code is too long, feel free to put it in a public gist and link it in the issue: https://gist.github.com\r\n-->\r\n\r\n```python\r\nfrom sktime.forecasting.model_selection import temporal_train_test_split\r\nfrom sktime.utils._testing.panel import _make_panel\r\n\r\ny = _make_panel(n_instances=2, n_timepoints=6)\r\n# make first instance series shorter than the second\r\ny.iloc[4:6] =None\r\ny.dropna(inplace=True)\r\n\r\ntrain_size, test_size = temporal_train_test_split(y,  test_size=2) \r\n# show shapes\r\nprint(\r\n    f\"\"\"\r\n    {y.shape=} \r\n    {train_size.shape=}, {test_size.shape=} #train size should be (6,1) 2+4=6\r\n    \"\"\"\r\n)\r\n\r\n# has also the same issue as #4968 below is the minimal example\r\ntrain_fh, test_fh = temporal_train_test_split(y,  fh=[1,2]) \r\n# show shapes\r\nprint(\r\n    f\"\"\"\r\n    {y.shape=} \r\n    {train_fh.shape=}, {test_fh.shape=} #train size should be (6,1) and test (4,1)\r\n   \"\"\"\r\n)\r\n```\r\n\r\noutput\r\n```\r\ny.shape=(10, 1) \r\ntrain_size.shape=(4, 1), test_size.shape=(4, 1) #train size should be 6 (2+4)\r\n\r\ny.shape=(10, 1) \r\ntrain_fh.shape=(8, 1), test_fh.shape=(2, 1) #train size should be (6,1) and test (4,1)\r\n```\r\n\r\n**Versions**\r\n<details>\r\n\r\n<!--\r\nPlease run the following code snippet and paste the output here:\r\n\r\nfrom sktime import show_versions; show_versions()\r\n-->\r\n main at [3cf69ed](https://github.com/sktime/sktime/commit/3cf69eddba315d6130b661ca5fe8e132e236aa47)\r\n\r\n</details>\r\n\r\n<!-- Thanks for contributing! -->\r\n\n", "before_files": [{"content": "\"\"\"Module for splitters.\"\"\"\n\n__all__ = [\n    \"CutoffSplitter\",\n    \"ExpandingGreedySplitter\",\n    \"ExpandingWindowSplitter\",\n    \"SameLocSplitter\",\n    \"SingleWindowSplitter\",\n    \"SlidingWindowSplitter\",\n    \"TestPlusTrainSplitter\",\n    \"temporal_train_test_split\",\n]\n\nfrom sktime.split.cutoff import CutoffSplitter\nfrom sktime.split.expandinggreedy import ExpandingGreedySplitter\nfrom sktime.split.expandingwindow import ExpandingWindowSplitter\nfrom sktime.split.sameloc import SameLocSplitter\nfrom sktime.split.singlewindow import SingleWindowSplitter\nfrom sktime.split.slidingwindow import SlidingWindowSplitter\nfrom sktime.split.temporal_train_test_split import temporal_train_test_split\nfrom sktime.split.testplustrain import TestPlusTrainSplitter\n", "path": "sktime/split/__init__.py"}], "after_files": [{"content": "\"\"\"Module for splitters.\"\"\"\n\n__all__ = [\n    \"CutoffSplitter\",\n    \"ExpandingGreedySplitter\",\n    \"ExpandingWindowSplitter\",\n    \"SameLocSplitter\",\n    \"SingleWindowSplitter\",\n    \"SlidingWindowSplitter\",\n    \"TemporalTrainTestSplitter\",\n    \"TestPlusTrainSplitter\",\n    \"temporal_train_test_split\",\n]\n\nfrom sktime.split.cutoff import CutoffSplitter\nfrom sktime.split.expandinggreedy import ExpandingGreedySplitter\nfrom sktime.split.expandingwindow import ExpandingWindowSplitter\nfrom sktime.split.sameloc import SameLocSplitter\nfrom sktime.split.singlewindow import SingleWindowSplitter\nfrom sktime.split.slidingwindow import SlidingWindowSplitter\nfrom sktime.split.temporal_train_test_split import (\n    TemporalTrainTestSplitter,\n    temporal_train_test_split,\n)\nfrom sktime.split.testplustrain import TestPlusTrainSplitter\n", "path": "sktime/split/__init__.py"}]}