code: def reorder(self, indices: mx.nd.NDArray) -> None:
          
          if self.global_avoid_states:
              self.global_avoid_states = [self.global_avoid_states[x] for x in indices.asnumpy()]
  
          if self.local_avoid_states:
              self.local_avoid_states = [self.local_avoid_states[x] for x in indices.asnumpy()]
docs: Reorders the avoid list according to the selected row indices.
          This can produce duplicates, but this is fixed if state changes occur in consume().
  
          :param indices: An mx.nd.NDArray containing indices of hypotheses to select.