def _pwdGetByName(username):
    """
    Look up a user in the /etc/passwd database using the pwd module.  If the
    pwd module is not available, return None.

    @param username: the username of the user to return the passwd database
        information for.
    @type username: L{str}
    """
    if pwd is None:
        return None
    return pwd.getpwnam(username)

    Look up a user in the /etc/passwd database using the pwd module.  If the
    pwd module is not available, return None.

    @param username: the username of the user to return the passwd database
        information for.
    @type username: L{str}
    
stackoverflow/venv/lib/python3.6/site-packages/twisted/conch/checkers.py