def getspnam(self, username):
        """
        Return the shadow user record corresponding to the given username.
        """
        for entry in self._users:
            if entry.sp_nam == username:
                return entry
        raise KeyError

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