def METHOD_NAME(self, reg: "Register", col: int) -> Any:
    mapping = {
        QRegisterTableModel.COL_REGISTER: lambda x: x.name,
        QRegisterTableModel.COL_VALUE: lambda x: repr(self.state.regs.get(x.name)),
    }
    func = mapping.get(col)
    if func is None:
        return None
    return func(reg)