<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(transport=None, host='localhost', username='admin', password='', port=None, timeout=60, return_node=False, **kwargs):
 """ Creates a connection using the supplied settings This function will create a connection to an Arista EOS node using the arguments. All arguments are optional with default values. Args: transport (str):
 Specifies the type of connection transport to use. Valid values for the connection are socket, http_local, http, and https. The default value is specified in DEFAULT_TRANSPORT host (str):
 The IP addres or DNS host name of the connection device. The default value is 'localhost' username (str):
 The username to pass to the device to authenticate the eAPI connection. The default value is 'admin' password (str):
 The password to pass to the device to authenticate the eAPI connection. The default value is '' port (int):
 The TCP port of the endpoint for the eAPI connection. If this keyword is not specified, the default value is automatically determined by the transport type. (http=80, https=443) return_node (bool):
 Returns a Node object if True, otherwise returns an EapiConnection object. Returns: An instance of an EapiConnection object for the specified transport. """

    transport = transport or DEFAULT_TRANSPORT
    connection = make_connection(transport, host=host, username=username,
                                 password=password, port=port, timeout=timeout)
    if return_node:
        return Node(connection, transport=transport, host=host,
                    username=username, password=password, port=port, **kwargs)
    return connection