def readlines(self, size=DEFAULT):
        if self.mode in WRITE_MODES:
            raise IOError('Bad file descriptor')

        # argument actually ignored
        if size is not DEFAULT:
            self._check_int_argument(size)

        result = list(self)
        self._in_iter = False
        return result
If the cost_matrix is called from within a cost function,
dataset/ETHPy150Open mockfs/mockfs/mockfs/storage.py/file.readlines--crossover with--dataset/ETHPy150Open lisa-lab/pylearn2/pylearn2/sandbox/rnn/models/mlp_hook.py/RNNWrapper.cost_matrix_wrapper