def detach_disk(name=None, kwargs=None, call=None):
    if call != 'action':
        raise SaltCloudSystemExit(
            'The detach_Disk action must be called with -a or --action.'
        )

    if not name:
        log.error(
            'Must specify an instance name.'
        )
        return False
    if not kwargs or 'disk_name' not in kwargs:
        log.error(
            'Must specify a disk_name to detach.'
        )
        return False

    node_name = name
    disk_name = kwargs['disk_name']

    conn = get_conn()
    node = conn.ex_get_node(node_name)
    disk = conn.ex_get_volume(disk_name)

    salt.utils.cloud.fire_event(
        'event',
        'detach disk',
        'salt/cloud/disk/detaching',
        {
            'name': node_name,
            'disk_name': disk_name,
        },
        transport=__opts__['transport']
    )

    result = conn.detach_volume(disk, node)

    salt.utils.cloud.fire_event(
        'event',
        'detached disk',
        'salt/cloud/disk/detached',
        {
            'name': node_name,
            'disk_name': disk_name,
        },
        transport=__opts__['transport']
    )
    return result
Initialize the sensor.
dataset/ETHPy150Open saltstack/salt/salt/cloud/clouds/gce.py/detach_disk--crossover with--dataset/ETHPy150Open home-assistant/home-assistant/homeassistant/components/sensor/speedtest.py/SpeedtestSensor.__init__