<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def conn_ali(cred, crid):
 """Establish connection to AliCloud service."""

    driver = get_driver(Provider.ALIYUN_ECS)
    try:
        ali_obj = driver(cred['ali_access_key_id'],
                         cred['ali_access_key_secret'],
                         region=cred['ali_region'])
    except SSLError as e:
        abort_err("\r SSL Error with AliCloud: {}".format(e))
    except InvalidCredsError as e:
        abort_err("\r Error with AliCloud Credentials: {}".format(e))
    return {crid: ali_obj}