def _get_attached_volume(ec2conn, ec2_instance_id, device):
    attached_vols = _get_attached_volumes(ec2conn, ec2_instance_id)

    for attached_vol in attached_vols:
        # Find the correct device
        if attached_vol.attach_data.device == device:
            return attached_vol

    return None
Get the EBS volume attached to the given instance as the given
dataset/ETHPy150Open winhamwr/neckbeard/neckbeard/cloud_provisioners/aws/ec2.py/_get_attached_volume