code: def sample(self, obs):
      obs = torch.FloatTensor(obs).to(self.device)
      probs, values = self.alg.prob_and_value(obs)
      probs = probs.cpu().detach().numpy()
      values = values.cpu().detach().numpy()
      sample_actions = np.array(
          [np.random.choice(len(prob), 1, p=prob)[0] for prob in probs]
      )
      return sample_actions, values
  
file_path: PARL/benchmark/torch/a2c/atari_agent.py
imports: import torch
  import parl
  from parl.utils.scheduler import PiecewiseScheduler, LinearDecayScheduler
  import numpy
label_desc: Use image node_id 2 for calling the Agent obj's underlying member method code with example usage: obj.sample(obs) and returns: sample_actions,  values