def get_kvlayer_stream_item_by_doc_id(client, doc_id):
if client is None:<EOL><INDENT>client = kvlayer.client()<EOL>client.setup_namespace(STREAM_ITEM_TABLE_DEFS,<EOL>STREAM_ITEM_VALUE_DEFS)<EOL><DEDENT>doc_id_range = make_doc_id_range(doc_id)<EOL>for k, v in client.scan(STREAM_ITEMS_TABLE, doc_id_range):<EOL><INDENT>if v is not None:<EOL><INDENT>errors, bytestr = streamcorpus.decrypt_and_uncompress(v)<EOL>yield streamcorpus.deserialize(bytestr)<EOL><DEDENT><DEDENT>
Retrieve :class:`streamcorpus.StreamItem`s from :mod:`kvlayer`.

    Namely, it returns an iterator over all documents with the given
    docid. The docid should be an md5 hash of the document's abs_url.

    :param client: kvlayer client object
    :type client: :class:`kvlayer.AbstractStorage`
    :param str doc_id: doc id of documents to retrieve
    :return: generator of :class:`streamcorpus.StreamItem`