def _checkClosed(self, msg=None):
        if self.closed:
            raise ValueError("I/O operation on closed file."
                             if msg is None else msg)

    ### Context manager ###
Internal: raise an ValueError if file is closed
dataset/ETHPy150Open azoft-dev-team/imagrium/env/Lib/_pyio.py/IOBase._checkClosed