def list_streams(doc: Doc) -> list:
    """List all in use Streams of doc."""
    ret = []
    for iref in in_use(doc):
        o = get_object(doc, iref)
        if type(o) == Stream:
            ret.append(int(iref.imag))
    return ret
List all in use Streams of doc.
pdfsyntax/api.py