def _get_volume_region(volume):
 return (getattr(volume.driver, 'region', None) or getattr(volume.driver, 'region_name', None))

def _get_volume_region ( volume ) : return ( getattr ( volume . driver , 'region' , None ) or getattr ( volume . driver , 'region_name' , None ) )
extract the region name from an aws or rackspace volume .