<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def load_name_info(self, db, name_record):
 """ Get some extra name information, given a db-loaded name record. Return the updated name_record """

        name = str(name_record['name'])
        name_record = self.sanitize_rec(name_record)

        namespace_id = get_namespace_from_name(name)
        namespace_record = db.get_namespace(namespace_id, include_history=False)
        if namespace_record is None:
            namespace_record = db.get_namespace_reveal(namespace_id, include_history=False)

        if namespace_record is None:
            # name can't exist (this can be arrived at if we're resolving a DID)
            return None

        # when does this name expire (if it expires)?
        if namespace_record['lifetime'] != NAMESPACE_LIFE_INFINITE:
            deadlines = BlockstackDB.get_name_deadlines(name_record, namespace_record, db.lastblock)
            if deadlines is not None:
                name_record['expire_block'] = deadlines['expire_block']
                name_record['renewal_deadline'] = deadlines['renewal_deadline']
            else:
                # only possible if namespace is not yet ready
                name_record['expire_block'] = -1
                name_record['renewal_deadline'] = -1

        else:
            name_record['expire_block'] = -1
            name_record['renewal_deadline'] = -1

        if name_record['expire_block'] > 0 and name_record['expire_block'] <= db.lastblock:
            name_record['expired'] = True
        else:
            name_record['expired'] = False

        # try to get the zonefile as well 
        if 'value_hash' in name_record and name_record['value_hash'] is not None:
            conf = get_blockstack_opts()
            if is_atlas_enabled(conf):
                zfdata = self.get_zonefile_data(name_record['value_hash'], conf['zonefiles'])
                if zfdata is not None:
                    zfdata = base64.b64encode(zfdata)
                    name_record['zonefile'] = zfdata

        return name_record