def METHOD_NAME(
    client,
    meta: ObjectMeta,
    queue: "ConcurrentQueue[Tuple[ByteStream, memoryview]]",
    path: str,
    serialization_options: Dict[str, str],
) -> ObjectID:
    """Returns:
    The generated stream or stream collection id.
    """
    if meta.typename == 'vineyard::Blob':
        blob = meta.get_buffer(meta.id)
        s = build_a_stream(
            client, meta, len(blob), os.path.join(path, 'blob'), serialization_options
        )
        queue.put((s, blob))
        return s.id
    else:
        metadata, streams = dict(), []
        metadata[StreamCollection.KEY_OF_GLOBAL] = meta.isglobal
        for k, v in meta.items():
            if k == 'typename':
                metadata['__typename'] = v
            elif isinstance(v, ObjectMeta):
                if v.islocal:
                    streams.append(
                        METHOD_NAME(
                            client,
                            v,
                            queue,
                            os.path.join(path, k),
                            serialization_options,
                        )
                    )
            else:
                metadata[k] = v
        metadata[StreamCollection.KEY_OF_PATH] = path
        collection = StreamCollection.new(client, metadata, streams)
        return collection.id