def _get_record(self, ipnum):
seek_country = self._seek_country(ipnum)<EOL>if seek_country == self._databaseSegments:<EOL><INDENT>return {}<EOL><DEDENT>read_length = (<NUM_LIT:2> * self._recordLength - <NUM_LIT:1>) * self._databaseSegments<EOL>try:<EOL><INDENT>self._lock.acquire()<EOL>self._fp.seek(seek_country + read_length, os.SEEK_SET)<EOL>buf = self._fp.read(const.FULL_RECORD_LENGTH)<EOL><DEDENT>finally:<EOL><INDENT>self._lock.release()<EOL><DEDENT>if PY3 and type(buf) is bytes:<EOL><INDENT>buf = buf.decode(ENCODING)<EOL><DEDENT>record = {<EOL>'<STR_LIT>': <NUM_LIT:0>,<EOL>'<STR_LIT>': <NUM_LIT:0>,<EOL>'<STR_LIT>': None,<EOL>'<STR_LIT>': None<EOL>}<EOL>latitude = <NUM_LIT:0><EOL>longitude = <NUM_LIT:0><EOL>char = ord(buf[<NUM_LIT:0>])<EOL>record['<STR_LIT>'] = const.COUNTRY_CODES[char]<EOL>record['<STR_LIT>'] = const.COUNTRY_CODES3[char]<EOL>record['<STR_LIT>'] = const.COUNTRY_NAMES[char]<EOL>record['<STR_LIT>'] = const.CONTINENT_NAMES[char]<EOL>def read_data(buf, pos):<EOL><INDENT>cur = pos<EOL>while buf[cur] != '<STR_LIT>':<EOL><INDENT>cur += <NUM_LIT:1><EOL><DEDENT>return cur, buf[pos:cur] if cur > pos else None<EOL><DEDENT>offset, record['<STR_LIT>'] = read_data(buf, <NUM_LIT:1>)<EOL>offset, record['<STR_LIT>'] = read_data(buf, offset + <NUM_LIT:1>)<EOL>offset, record['<STR_LIT>'] = read_data(buf, offset + <NUM_LIT:1>)<EOL>offset = offset + <NUM_LIT:1><EOL>for j in range(<NUM_LIT:3>):<EOL><INDENT>latitude += (ord(buf[offset + j]) << (j * <NUM_LIT:8>))<EOL><DEDENT>for j in range(<NUM_LIT:3>):<EOL><INDENT>longitude += (ord(buf[offset + j + <NUM_LIT:3>]) << (j * <NUM_LIT:8>))<EOL><DEDENT>record['<STR_LIT>'] = (latitude / <NUM_LIT>) - <NUM_LIT><EOL>record['<STR_LIT>'] = (longitude / <NUM_LIT>) - <NUM_LIT><EOL>if self._databaseType in (const.CITY_EDITION_REV1, const.CITY_EDITION_REV1_V6):<EOL><INDENT>if record['<STR_LIT>'] == '<STR_LIT>':<EOL><INDENT>dma_area = <NUM_LIT:0><EOL>for j in range(<NUM_LIT:3>):<EOL><INDENT>dma_area += ord(buf[offset + j + <NUM_LIT:6>]) << (j * <NUM_LIT:8>)<EOL><DEDENT>record['<STR_LIT>'] = int(floor(dma_area / <NUM_LIT:1000>))<EOL>record['<STR_LIT>'] = dma_area % <NUM_LIT:1000><EOL>record['<STR_LIT>'] = const.DMA_MAP.get(record['<STR_LIT>'])<EOL><DEDENT><DEDENT>params = (record['<STR_LIT>'], record['<STR_LIT>'])<EOL>record['<STR_LIT>'] = time_zone_by_country_and_region(*params)<EOL>return record<EOL>
Populate location dict for converted IP.
Returns dict with numerous location properties.

:arg ipnum: Result of ip2long conversion