def _GetMatchingVolume(device_name, partition):
    for volume_spec in volumes:
        pd = volume_spec.get('gcePersistentDisk', {})
        if ((pd.get('pdName') == device_name) and (pd.get('partition') == partition)):
            return volume_spec
def _GetMatchingVolume(device_name, partition):
    for volume_spec in volumes:
        pd = volume_spec.get('gcePersistentDisk', {})
        if ((pd.get('pdName') == device_name) and (pd.get('partition') == partition)):
            return volume_spec