<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def connect(port=8813, numRetries=10, host="localhost", proc=None):
 """ Establish a connection to a TraCI-Server and return the connection object. The connection is not saved in the pool and not accessible via traci.switch. It should be safe to use different connections established by this method in different threads. """

    for wait in range(1, numRetries + 2):
        try:
            return Connection(host, port, proc)
        except socket.error as e:
            print("Could not connect to TraCI server at %s:%s" %
                  (host, port), e)
            if wait < numRetries + 1:
                print(" Retrying in %s seconds" % wait)
                time.sleep(wait)
    raise FatalTraCIError(str(e))