<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def _authenticate():
    '''
    Retrieve CSRF and API tickets for the Proxmox API
    '''
    global url, port, ticket, csrf, verify_ssl
    url = config.get_cloud_config_value(
        'url', get_configured_provider(), __opts__, search_global=False
    )
    port = config.get_cloud_config_value(
        'port', get_configured_provider(), __opts__,
        default=8006, search_global=False
    )
    username = config.get_cloud_config_value(
        'user', get_configured_provider(), __opts__, search_global=False
    ),
    passwd = config.get_cloud_config_value(
        'password', get_configured_provider(), __opts__, search_global=False
    )
    verify_ssl = config.get_cloud_config_value(
        'verify_ssl', get_configured_provider(), __opts__,
        default=True, search_global=False
    )

    connect_data = {'username': username, 'password': passwd}
    full_url = 'https://{0}:{1}/api2/json/access/ticket'.format(url, port)

    returned_data = requests.post(
        full_url, verify=verify_ssl, data=connect_data).json()

    ticket = {'PVEAuthCookie': returned_data['data']['ticket']}
    csrf = six.text_type(returned_data['data']['CSRFPreventionToken'])