def _find_stream_by_type(streams, stream_type="EEG"):
    """Find the first stream that matches the given type."""
    for stream in streams:
        if stream["info"]["type"][0] == stream_type:
            return stream