def is_fits(filename):
    from astropy.io import fits
    try:
        with warnings.catch_warnings():
            warnings.simplefilter("ignore")
            with fits.open(filename, ignore_missing_end=True):
                return True
    except __HOLE__:
        return False
dataset/ETHPy150Open glue-viz/glue/glue/core/data_factories/fits.py/is_fits