def close_if_possible(self):
    'close storage to ensure any pending data is written'
    try:
        do_close = self.d.close
    except __HOLE__:
        pass
    else:
        do_close()
dataset/ETHPy150Open cjlee112/pygr/pygr/mapping.py/close_if_possible