code: def get_country_by_id(self, country_id: int) -> typing.Optional['Country']:
          
          VALID_POSITIVE_INT.validate(country_id, 'get_country_by_id')
          if country_id not in self._countries_by_id.keys():
              for country in self.countries:
  
                  if country.country_id == country_id:
                      self._countries_by_id[country_id] = country
                      return country
              raise ValueError(country_id)
          else:
              return self._countries_by_id[country_id]
docs: Gets a country from its name
  
          Args:
              country_id: country id
  
          Returns: Country