import pickle
from functools import partial as partial
from pickle import _Pickler as Pickler  # type: ignore[attr-defined]
from typing import Any, Optional

DEFAULT_PROTOCOL: Any
string_types: Any
PY3: bool
PY2: bool

def cell_set(cell: Any, value: Any): ...

STORE_GLOBAL: Any
DELETE_GLOBAL: Any
LOAD_GLOBAL: Any
GLOBAL_OPS: Any
HAVE_ARGUMENT: Any
EXTENDED_ARG: Any

def islambda(func: Any): ...

class CloudPickler(Pickler):
    dispatch: Any = ...
    globals_ref: Any = ...
    def __init__(self, file: Any, protocol: Optional[Any] = ...) -> None: ...
    def dump(self, obj: Any): ...
    def save_memoryview(self, obj: Any) -> None: ...
    def save_module(self, obj: Any) -> None: ...
    def save_codeobject(self, obj: Any) -> None: ...
    def save_function(self, obj: Any, name: Optional[Any] = ...): ...
    def save_dynamic_class(self, obj: Any) -> None: ...
    def save_function_tuple(self, func: Any) -> None: ...
    @classmethod
    def extract_code_globals(cls, co: Any): ...
    def extract_func_data(self, func: Any): ...
    def save_builtin_function(self, obj: Any): ...
    def save_global(self, obj: Any, name: Optional[Any] = ..., pack: Any = ...): ...
    def save_instancemethod(self, obj: Any) -> None: ...
    def save_inst(self, obj: Any) -> None: ...
    def save_property(self, obj: Any) -> None: ...
    def save_classmethod(self, obj: Any) -> None: ...
    def save_itemgetter(self, obj: Any): ...
    attrs: Any = ...
    index: Any = ...
    def save_attrgetter(self, obj: Any): ...
    def save_file(self, obj: Any): ...
    def save_ellipsis(self, obj: Any) -> None: ...
    def save_not_implemented(self, obj: Any) -> None: ...
    def save_weakset(self, obj: Any) -> None: ...
    def save_logger(self, obj: Any) -> None: ...
    def save_root_logger(self, obj: Any) -> None: ...
    def save_mappingproxy(self, obj: Any) -> None: ...
    def inject_addons(self) -> None: ...

def is_tornado_coroutine(func: Any): ...
def dump(obj: Any, file: Any, protocol: Optional[Any] = ...) -> None: ...
def dumps(obj: Any, protocol: Optional[Any] = ...): ...

load = pickle.load
loads = pickle.loads

def subimport(name: Any): ...
def dynamic_subimport(name: Any, vars: Any): ...
def instance(cls): ...

class _empty_cell_value:
    @classmethod
    def __reduce__(cls): ...
