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

def _get_datacenter_name():
    '''
    Returns the datacenter name configured on the proxy

    Supported proxies: esxcluster, esxdatacenter
    '''

    proxy_type = __salt__['vsphere.get_proxy_type']()
    details = None
    if proxy_type == 'esxcluster':
        details = __salt__['esxcluster.get_details']()
    elif proxy_type == 'esxdatacenter':
        details = __salt__['esxdatacenter.get_details']()
    if not details:
        raise salt.exceptions.CommandExecutionError(
            'details for proxy type \'{0}\' not loaded'.format(proxy_type))
    return details['datacenter']