from typing import Sequence

def attach_and_exec(pid: int, python_code: str, /) -> None: ...
def exec_in_threads(pid: int, tids: Sequence[int], python_code: str, /) -> None: ...
def reap_process(pid: int, timeout_ms: int) -> int: ...

class AttachError(Exception): ...
class UnknownStateError(AttachError): ...
class InterruptedError(AttachError): ...
class ReapError(Exception): ...
class SignalledError(ReapError): ...
