def get_name_for_fd(fd):
        """
        Return the process name for a given process ID.
        """
        pgrp = os.tcgetpgrp(fd)

        try:
            with open(pgrp % '/proc/%s/cmdline', 'rb') as f:
                return f.read().decode('utf-8', 'ignore').partition('\0')[0]
        except IOError:
            pass
dataset/ETHPy150Open jonathanslenders/pymux/pymux/process.py/get_name_for_fd/swapped operands of `%`