from __future__ import annotations

import multiprocessing
from typing import Any

fork_context = multiprocessing

def cache(reader: Any): ...
def map_readers(func: Any, *readers: Any): ...
def shuffle(reader: Any, buf_size: Any): ...
def chain(*readers: Any): ...

class ComposeNotAligned(ValueError): ...

def compose(*readers: Any, **kwargs: Any): ...
def buffered(reader: Any, size: Any): ...
def firstn(reader: Any, n: Any): ...

class XmapEndSignal: ...

def xmap_readers(mapper: Any, reader: Any, process_num: Any, buffer_size: Any, order: bool = ...): ...
def multiprocess_reader(readers: Any, use_pipe: bool = ..., queue_size: int = ...): ...
