code: def update_index_for_direction(self, index_direction, index):
          
          indexes = self._slice_data_source.indexes_for_direction(index_direction)
  
          if index < 0:
              index = 0
          elif index >= len(indexes):
              index = len(indexes) - 1
  
          for m in self._available_slice_models:
              if m.index_direction == index_direction:
                  m.index = index
  
              if m.x_index_direction == index_direction:
                  m.x_index = index
  
              if m.y_index_direction == index_direction:
                  m.y_index = index
  
          self.load_data()
docs: :type index_direction: SliceDirection
          :type index: int