docs: def get_country_code(longname):
      """
      :returns: the code of the country contained in `longname`, or a ValuError
  
      >>> for country, code in country2code.items():
      ...     assert get_country_code('Exp_' + country) == code, (country, code)
      """
      mo = re.search(REGEX, longname, re.I)
      if mo is None:
          raise ValueError('Could not find a valid country in %s' % longname)
      return country2code[COUNTRIES[mo.lastindex - 1]]