<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def ip_address():
 """Get the IP address used for public connections."""

    s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
    # 8.8.8.8 is the google public DNS
    s.connect(("8.8.8.8", 53))
    ip = s.getsockname()[0]
    s.close()
    return ip