@classmethod
def close(cls, stream):
    """
        Close a stream. Typically use :py:func:`Stream.close` instead.

        :param stream: An instance of the :py:class:`Stream` object.
        :raises ValueError: if stream does not exist.
        """
    if stream not in cls._streams:
        raise ValueError("Stream `%s' not found" % str(stream))
    stream.close()
