from typing import Any, Optional
from weakref import ref

class WeakMethod(ref):
    def __new__(cls, meth: Any, callback: Optional[Any] = ...): ...
    def __call__(self): ...
    def __eq__(self, other: Any) -> Any: ...
    def __ne__(self, other: Any) -> Any: ...
    __hash__: Any = ...
