code: def avail_locations(call=None):
      '''
      Return a dict of all available VM locations on the cloud provider with
      relevant data
      '''
      if call == 'action':
          raise SaltCloudSystemExit(
              'The avail_locations function must be called with '
              '-f or --function, or with the --list-locations option'
          )
  
      params = {'Action': 'DescribeRegions'}
      items = query(params=params)
  
      ret = {}
      for region in items['Regions']['Region']:
          ret[region['RegionId']] = {}
          for item in region:
              ret[region['RegionId']][item] = six.text_type(region[item])
  
      return ref avail_locations(call=None):
      '''
      Return a dict of all available VM locations on the cloud provider with
      relevant data
      '''
      if call == 'action':
          raise SaltCloudSystemExit(
              'The avail_locations function must be called with '
              '-f or --function, or with the --list-locations option'
          )
  
      params = {'Action': 'DescribeRegions'}
      items = query(params=params)
  
      ret = {}
      for region in items['Regions']['Region']:
          ret[region['RegionId']] = {}
          for item in region:
              ret[region['RegionId']][item] = six.text_type(region[item])
  
      return ret
docs: Return a dict of all available VM locations on the cloud provider with
      relevant data