def _check_stream_definitions(
        stream_definitions: TStreamsUserDict,
    ) -> Dict[str, StreamDef]:
        """
        A function used to check the input stream definitions.

        This function should returns the adapted definition in which the
        missing optional fields are filled. If the input definition doesn't
        follow the expected structure, a `ValueError` will be raised.

        :param stream_definitions: The input stream definitions.
        :return: The checked and adapted stream definitions.
        """
        streams_defs = dict()

        if "train" not in stream_definitions:
            raise ValueError("No train stream found!")

        if "test" not in stream_definitions:
            raise ValueError("No test stream found!")

        for stream_name, stream_user_def in stream_definitions.items():
            DatasetScenario._check_stream_name(stream_name)
            stream_def = DatasetScenario._check_and_adapt_user_stream_def(
                stream_user_def, stream_name
            )
            streams_defs[stream_name] = stream_def

        return streams_defs

        A function used to check the input stream definitions.

        This function should returns the adapted definition in which the
        missing optional fields are filled. If the input definition doesn't
        follow the expected structure, a `ValueError` will be raised.

        :param stream_definitions: The input stream definitions.
        :return: The checked and adapted stream definitions.
        
avalanche/benchmarks/scenarios/deprecated/dataset_scenario.py