# Path: aio_pika/pool.py
# class PoolInstance(abc.ABC):
#     @abc.abstractmethod
#     def close(self) -> Awaitable[None]:
#         raise NotImplementedError
# 
# Path: aio_pika/tools.py
# T = TypeVar("T")
# def iscoroutinepartial(fn: Callable[..., Any]) -> bool:
# def create_task(
#     func: Callable[..., Union[Coroutine[Any, Any, T], Awaitable[T]]],
#     *args: Any,
#     loop: Optional[asyncio.AbstractEventLoop] = None,
#     **kwargs: Any
# ) -> Awaitable[T]:
#     def run(future: asyncio.Future) -> Optional[asyncio.Future]:
# def task(
#     func: Callable[..., Coroutine[Any, Any, T]],
# ) -> Callable[..., Awaitable[T]]:
#     def wrap(*args: Any, **kwargs: Any) -> Awaitable[T]:
# def shield(func: Callable[..., Awaitable[T]]) -> Callable[..., Awaitable[T]]:
#     def wrap(*args: Any, **kwargs: Any) -> Awaitable[T]:
#     def __init__(self, sender: Union[T, ReferenceType]):
#     def add(
#         self, callback: Callable[..., Any], weak: bool = False,
#     ) -> None:
#     def discard(self, callback: Callable[..., Any]) -> None:
#     def clear(self) -> None:
#     def is_frozen(self) -> bool:
#     def freeze(self) -> None:
#     def unfreeze(self) -> None:
#     def __contains__(self, x: object) -> bool:
#     def __len__(self) -> int:
#     def __iter__(self) -> Iterator[CallbackType]:
#     def __bool__(self) -> bool:
#     def __copy__(self) -> "CallbackCollection":
#     def __call__(self, *args: Any, **kwargs: Any) -> None:
#     def __hash__(self) -> int:
# class CallbackCollection(MutableSet):


import asyncio
import aiormq
from abc import ABC, abstractmethod
from datetime import datetime, timedelta
from enum import Enum, IntEnum, unique
from types import TracebackType
from typing import (
    Any, AsyncContextManager, Awaitable, Callable, Dict, FrozenSet, Generator,
    Iterator, MutableMapping, NamedTuple, Optional, Set, Tuple, Type, TypeVar,
    Union,
)
from aiormq.abc import ExceptionType
from pamqp.common import Arguments
from yarl import URL
from .pool import PoolInstance
from .tools import CallbackCollection, CallbackSetType, CallbackType

    @abstractmethod
    async def unbind(
        self,
        exchange: ExchangeParamType,
        routing_key: str = "",
        arguments: Arguments = None,
        timeout: TimeoutType = None,
    ) -> aiormq.spec.Exchange.UnbindOk:
        raise NotImplementedError

    @abstractmethod
    async def publish(
        self,
        message: "AbstractMessage",
        routing_key: str,
        *,
        mandatory: bool = True,
        immediate: bool = False,
        timeout: TimeoutType = None
    ) -> Optional[aiormq.abc.ConfirmationFrameType]:
        raise NotImplementedError

    @abstractmethod
    async def delete(
        self, if_unused: bool = False, timeout: TimeoutType = None,
    ) -> aiormq.spec.Exchange.DeleteOk:
        raise NotImplementedError



# Path: aio_pika/pool.py
# class PoolInstance(abc.ABC):
#     @abc.abstractmethod
#     def close(self) -> Awaitable[None]:
#         raise NotImplementedError
# 
# Path: aio_pika/tools.py
# T = TypeVar("T")
# def iscoroutinepartial(fn: Callable[..., Any]) -> bool:
# def create_task(
#     func: Callable[..., Union[Coroutine[Any, Any, T], Awaitable[T]]],
#     *args: Any,
#     loop: Optional[asyncio.AbstractEventLoop] = None,
#     **kwargs: Any
# ) -> Awaitable[T]:
#     def run(future: asyncio.Future) -> Optional[asyncio.Future]:
# def task(
#     func: Callable[..., Coroutine[Any, Any, T]],
# ) -> Callable[..., Awaitable[T]]:
#     def wrap(*args: Any, **kwargs: Any) -> Awaitable[T]:
# def shield(func: Callable[..., Awaitable[T]]) -> Callable[..., Awaitable[T]]:
#     def wrap(*args: Any, **kwargs: Any) -> Awaitable[T]:
#     def __init__(self, sender: Union[T, ReferenceType]):
#     def add(
#         self, callback: Callable[..., Any], weak: bool = False,
#     ) -> None:
#     def discard(self, callback: Callable[..., Any]) -> None:
#     def clear(self) -> None:
#     def is_frozen(self) -> bool:
#     def freeze(self) -> None:
#     def unfreeze(self) -> None:
#     def __contains__(self, x: object) -> bool:
#     def __len__(self) -> int:
#     def __iter__(self) -> Iterator[CallbackType]:
#     def __bool__(self) -> bool:
#     def __copy__(self) -> "CallbackCollection":
#     def __call__(self, *args: Any, **kwargs: Any) -> None:
#     def __hash__(self) -> int:
# class CallbackCollection(MutableSet):


# Path: aio_pika/abc.py
import asyncio
import aiormq
from abc import ABC, abstractmethod
from datetime import datetime, timedelta
from enum import Enum, IntEnum, unique
from types import TracebackType
from typing import (
    Any, AsyncContextManager, Awaitable, Callable, Dict, FrozenSet, Generator,
    Iterator, MutableMapping, NamedTuple, Optional, Set, Tuple, Type, TypeVar,
    Union,
)
from aiormq.abc import ExceptionType
from pamqp.common import Arguments
from yarl import URL
from .pool import PoolInstance
from .tools import CallbackCollection, CallbackSetType, CallbackType


    @abstractmethod
    async def unbind(
        self,
        exchange: ExchangeParamType,
        routing_key: str = "",
        arguments: Arguments = None,
        timeout: TimeoutType = None,
    ) -> aiormq.spec.Exchange.UnbindOk:
        raise NotImplementedError

    @abstractmethod
    async def publish(
        self,
        message: "AbstractMessage",
        routing_key: str,
        *,
        mandatory: bool = True,
        immediate: bool = False,
        timeout: TimeoutType = None
    ) -> Optional[aiormq.abc.ConfirmationFrameType]:
        raise NotImplementedError

    @abstractmethod
    async def delete(
        self, if_unused: bool = False, timeout: TimeoutType = None,
    ) -> aiormq.spec.Exchange.DeleteOk:
        raise NotImplementedError



class AbstractChannel(PoolInstance, ABC):