def METHOD_NAME(metadata_stream, index, **kwargs):
    """
    Raw metadata to Dataset stream converter.
    Given a stream of (uri, metadata) tuples convert them into Datasets, using
    supplied index and options for Doc2Dataset.
    **kwargs**:
    - skip_lineage
    - verify_lineage
    - fail_on_missing_lineage
    - products
    - exclude_products
    returns a sequence of tuples where each tuple is either
        (Dataset, None) or (None, error_message)
    """
    doc2ds = Doc2Dataset(index, **kwargs)
    for uri, metadata in metadata_stream:
        if metadata is None:
            yield (None, f"Error: empty doc {uri}")
        else:
            ds, err = doc2ds(metadata, uri)
            if ds is not None:
                yield (ds, None)
            else:
                yield (None, f"Error: {uri}, {err}")