code: def resample(self, selection):
      entropys = []
      new_selections = []
      sample_probs = []
      for idx, cont in enumerate(self.controllers):
          cont = self.controllers[idx]
          group = self.groups[idx]
          new_selection = cont.resample(group, selection)
          new_selections.append(new_selection)
          entropy = cont.sample_entropy
          entropys.append(entropy)
          sample_probs.append(cont.sample_log_prob)
      print(f"$$entropys {entropys}")
      if self.guide_type == 0:
          # use the most uncertain one
          idx = np.argmax(entropys)
      elif self.guide_type == 1:
          # or sample by using entropy
          idx = torch.multinomial(
              F.softmax(torch.tensor(entropys), dim=0), 1
          ).item()
      else:
          assert False, f"Not implemented guide type {self.guide_type}"
      group = self.groups[idx]
      print(f"$$select group {group}")
      new_selection = new_selections[idx]
      self.sample_log_prob = sample_probs[idx]
      self.sample_entropy = entropys[idx]
      print(f"$$new selection {new_selection}")
      return new_selection
  
file_path: AutoGL/autogl/module/nas/algorithm/agnn_rl.py
imports: from .rl import *
  import numpy
label_desc: Use image node_id 3 for calling the AGNNActionGuider obj's underlying member method code with example usage: obj.resample(selection) and returns: new_selection