<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def _outfp_write_with_check(self, outfp, data, enable_overwrite_check=True):
        # type: (BinaryIO, bytes, bool) -> None
        '''
        Internal method to write data out to the output file descriptor,
        ensuring that it doesn't go beyond the bounds of the ISO.

        Parameters:
         outfp - The file object to write to.
         data - The actual data to write.
         enable_overwrite_check - Whether to do overwrite checking if it is enabled.  Some pieces of code explicitly want to overwrite data, so this allows them to disable the checking.
        Returns:
         Nothing.
        '''
        start = outfp.tell()
        outfp.write(data)
        if self._track_writes:
            # After the write, double check that we didn't write beyond the
            # boundary of the PVD, and raise a PyCdlibException if we do.
            end = outfp.tell()
            if end > self.pvd.space_size * self.pvd.logical_block_size():
                raise pycdlibexception.PyCdlibInternalError('Wrote past the end of the ISO! (%d > %d)' % (end, self.pvd.space_size * self.pvd.logical_block_size()))

            if enable_overwrite_check:
                bisect.insort_left(self._write_check_list, self._WriteRange(start, end - 1))