def _is_lun_id_available_on_host(client, host, lun_id):
 mapping = client.get_volume_mappings_for_host(host['hostRef'])
 used_lun_ids = _get_used_lun_ids_for_mappings(mapping)
 return (lun_id not in used_lun_ids)

def _is_lun_id_available_on_host ( client , host , lun_id ) : mapping = client . get_volume_mappings_for_host ( host [ 'hostRef' ] ) used_lun_ids = _get_used_lun_ids_for_mappings ( mapping ) return ( lun_id not in used_lun_ids )
returns a boolean value depending on whether a lun id is available .