code: def get_new_cell_attr_state(self, key, attr_key):
          
  
          cell_attributes = self.grid.code_array.cell_attributes
          attr_values = self.attr_toggle_values[attr_key]
  
          # Map attr_value to next attr_value
          attr_map = dict(zip(attr_values, attr_values[1:] + attr_values[:1]))
  
          # Return next value from attr_toggle_values value list
  
          return attr_map[cell_attributes[key][attr_key]]
docs: Returns new attr cell state for toggles
  
          Parameters
          ----------
          key: 3-Tuple
          \tCell for which attr toggle shall be returned
          attr_key: Hashable
          \tAttribute key