<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( host='localhost', port=21050, database='default', timeout=45, use_ssl=False, ca_cert=None, user=None, password=None, auth_mechanism='NOSASL', kerberos_service_name='impala', pool_size=8, hdfs_client=None, ):
 """Create an ImpalaClient for use with Ibis. Parameters host : str, optional Host name of the impalad or HiveServer2 in Hive port : int, optional Impala's HiveServer2 port database : str, optional Default database when obtaining new cursors timeout : int, optional Connection timeout in seconds when communicating with HiveServer2 use_ssl : bool, optional Use SSL when connecting to HiveServer2 ca_cert : str, optional Local path to 3rd party CA certificate or copy of server certificate for self-signed certificates. If SSL is enabled, but this argument is ``None``, then certificate validation is skipped. user : str, optional LDAP user to authenticate password : str, optional LDAP password to authenticate auth_mechanism : str, optional {'NOSASL' <- default, 'PLAIN', 'GSSAPI', 'LDAP'}. Use NOSASL for non-secured Impala connections. Use PLAIN for non-secured Hive clusters. Use LDAP for LDAP authenticated connections. Use GSSAPI for Kerberos-secured clusters. kerberos_service_name : str, optional Specify particular impalad service principal. Examples -------- Returns ------- ImpalaClient """

    params = {
        'host': host,
        'port': port,
        'database': database,
        'timeout': timeout,
        'use_ssl': use_ssl,
        'ca_cert': ca_cert,
        'user': user,
        'password': password,
        'auth_mechanism': auth_mechanism,
        'kerberos_service_name': kerberos_service_name,
    }

    con = ImpalaConnection(pool_size=pool_size, **params)
    try:
        client = ImpalaClient(con, hdfs_client=hdfs_client)
    except Exception:
        con.close()
        raise
    else:
        if options.default_backend is None:
            options.default_backend = client

    return client