def region_by_addr(self, addr):
if self._databaseType not in const.REGION_CITY_EDITIONS:<EOL><INDENT>message = '<STR_LIT>'<EOL>raise GeoIPError(message)<EOL><DEDENT>ipnum = util.ip2long(addr)<EOL>return self._get_region(ipnum)<EOL>
Returns dictionary containing `country_code` and `region_code`.

:arg addr: IP address (e.g. 203.0.113.30)