<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def auth_connect(host, port=None):
 """Open an `nds2.connection` handling simple authentication errors This method will catch exceptions related to kerberos authentication, and execute a kinit() for the user before attempting to connect again. Parameters host : `str` name of server with which to connect port : `int`, optional connection port Returns ------- connection : `nds2.connection` a new open connection to the given NDS host """

    try:
        return connect(host, port)
    except RuntimeError as exc:
        if 'Request SASL authentication' not in str(exc):
            raise
    warnings.warn('Error authenticating against {0}:{1}'.format(host, port),
                  NDSWarning)
    kinit()
    return connect(host, port)