def getpwuid(self, uid):
        """
        Return the user record corresponding to the given uid.
        """
        for entry in self._users:
            if entry.pw_uid == uid:
                return entry
        raise KeyError()

        Return the user record corresponding to the given uid.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/python/fakepwd.py