<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_register_context(self, data):
 """ Set registers from GDB hexadecimal string. """

        logging.debug("GDB setting register context")
        reg_num_list = []
        reg_data_list = []
        for reg in self._register_list:
            if reg.bitsize == 64:
                regValue = conversion.hex16_to_u64be(data)
                data = data[16:]
            else:
                regValue = conversion.hex8_to_u32be(data)
                data = data[8:]
            reg_num_list.append(reg.reg_num)
            reg_data_list.append(regValue)
            logging.debug("GDB reg: %s = 0x%X", reg.name, regValue)
        self._context.write_core_registers_raw(reg_num_list, reg_data_list)