kubeflow pipeline components can accept and pass types of artifacts, according to their documentation.
You can change your code to the following to stop this error:
from kfp.dsl import Dataset, Artifact
@kfp.dsl.component
def turn_window_generator(df: Dataset) -> Artifact:
....
return wide_window