def _parse_lsof_output(self, out):
        def isopen(line):
            return line.startswith('f') and ("deleted" not in line and
                'mem' not in line and "txt" not in line and 'cwd' not in line)

        open_files = []

        for line in out.split("\n"):
            if isopen(line):
                fields = line.split('\0')
                fd = fields[0][1:]
                filename = fields[1][1:]
                if filename.startswith('/'):
                    open_files.append((fd, filename))

        return open_files
dataset/ETHPy150Open pytest-dev/pytest/_pytest/pytester.py/LsofFdLeakChecker._parse_lsof_output/original