human
Complete this python program:
def create(vm_):
assistant
#Here is the Python code you requested.

    """Create a single VM from a data dict
    """
    try:
        if (vm_['profile'] and (config.is_profile_configured(__opts__, (__active_provider_name__ or 'azure'), vm_['profile'], vm_=vm_) is False)):
            return False
    except AttributeError:
        pass
    __utils__['cloud.fire_event']('event', 'starting    create', 'salt/cloud/{0}/creating'.format(vm_['name']), args=__utils__['cloud.filter_event']('creating', vm_, ['name', 'profile', 'provider', 'driver']), sock_dir=__opts__['sock_dir'], transport=__opts__['transport'])
    log.info('Creating    Cloud    VM    {0}'.format(vm_['name']))
    global compconn
    if (not compconn):
        compconn = get_conn()
    def _query_ip_address():
        data = request_instance(kwargs=vm_)
        ifaces = data['network_profile']['network_interfaces']
        iface = list(ifaces)[0]
        ip_name = list(ifaces[iface]['ip_configurations'])[0]
        if (vm_.get('public_ip') is True):
            hostname = ifaces[iface]['ip_configurations'][ip_name]['public_ip_address']
        else:
            hostname = ifaces[iface]['ip_configurations'][ip_name]['private_ip_address']
        if isinstance(hostname, dict):
            hostname = hostname.get('ip_address')
        if (not isinstance(hostname, six.string_types)):
            return None
        return hostname
    try:
        data = salt.utils.cloud.wait_for_ip(_query_ip_address, timeout=config.get_cloud_config_value('wait_for_ip_timeout', vm_, __opts__, default=(10 * 60)), interval=config.get_cloud_config_value('wait_for_ip_interval', vm_, __opts__, default=10), interval_multiplier=config.get_cloud_config_value('wait_for_ip_interval_multiplier', vm_, __opts__, default=1))
    except (SaltCloudExecutionTimeout, SaltCloudExecutionFailure, SaltCloudSystemExit) as exc:
        try:
            log.warning(exc)
        finally:
            raise SaltCloudSystemExit(str(exc))
    hostname = data
    if ((not hostname) or (not isinstance(hostname, six.string_types))):
        log.error('Failed    to    get    a    value    for    the    hostname.')
   ...