import pyarrow
from typing import Any

def pyarrow_array_to_numpy_and_mask(arr: Any, dtype: Any) -> Any: ...

class ArrowPeriodType(pyarrow.ExtensionType):   # type: ignore
    def __init__(self, freq: Any) -> None: ...
    @property
    def freq(self) -> Any: ...
    def __arrow_ext_serialize__(self) -> Any: ...
    @classmethod
    def __arrow_ext_deserialize__(cls, storage_type: Any, serialized: Any) -> Any: ...
    def __eq__(self, other: Any) -> Any: ...
    def __hash__(self) -> Any: ...

class ArrowIntervalType(pyarrow.ExtensionType):   # type: ignore
    def __init__(self, subtype: Any, closed: Any) -> None: ...
    @property
    def subtype(self) -> Any: ...
    @property
    def closed(self) -> Any: ...
    def __arrow_ext_serialize__(self) -> Any: ...
    @classmethod
    def __arrow_ext_deserialize__(cls, storage_type: Any, serialized: Any) -> Any: ...
    def __eq__(self, other: Any) -> Any: ...
    def __hash__(self) -> Any: ...
