# AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/10_isad.ipynb.

# %% auto 0
__all__ = ['anndata', 'isanndata', 'isad']

# %% ../nbs/10_isad.ipynb 4
from typing import TypeGuard, ForwardRef, TypeAlias
try: from anndata import AnnData
except ImportError: AnnData = list
anndata: TypeAlias = ForwardRef('ad.AnnData', module='anndata', is_class=True)

# %% ../nbs/10_isad.ipynb 6
def isanndata(x) -> TypeGuard[anndata]:
    '''Check if `x` is an `ad.AnnData`.'''
    return isinstance(x, AnnData)

def isad(x) -> TypeGuard[anndata]:
    '''Check if `x` is an `ad.AnnData`.'''
    return isinstance(x, AnnData)
