code: def parse_conference_address(address_string):
      
  
      geo_elements = address_string.split(',')
      city = geo_elements[0]
      country_name = geo_elements[-1].upper().replace('.', '').strip()
      us_state = None
      state = None
      country_code = None
  
      # Try to match the country
      country_code = match_country_name_to_its_code(country_name, city)
  
      if country_code == 'US' and len(geo_elements) > 1:
          us_state = match_us_state(geo_elements[-2].upper().strip()
                                    .replace('.', ''))
  
      if not country_code:
          # Sometimes the country name stores info about U.S. state
          us_state = match_us_state(country_name)
  
      if us_state:
          state = us_state
          country_code = 'US'
  
      return {
          'cities': [
              city,
          ],
          'country_code': country_code,
          'postal_code': None,
          'state': state,
      }
docs: Parse a conference address.
  
      This is a pretty dummy address parser. It only extracts country
      and state (for US) and should be replaced with something better,
      like Google Geocoding.