def getCommand(self, commandName):
        """
        Return the path of the shell command named C{commandName}, looking at
        common locations.
        """
        binLoc = FilePath('/bin').child(commandName)
        usrbinLoc = FilePath('/usr/bin').child(commandName)

        if binLoc.exists():
            return binLoc._asBytesPath()
        elif usrbinLoc.exists():
            return usrbinLoc._asBytesPath()
        else:
            raise RuntimeError(
                "%s not found in /bin or /usr/bin" % (commandName,))

        Return the path of the shell command named C{commandName}, looking at
        common locations.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_process.py