def METHOD_NAME(self):
    if ~self.valid_data:
        for i in range(self.num_tb):
            self.valid_data_all[i] = 0
    else:
        for i in range(self.num_tb):
            if i == self.tb_index_for_data:
                self.valid_data_all[i] = 1
            else:
                self.valid_data_all[i] = 0