docstr: Sample action from parameterized policy
          
docstr_tok: ["Sample","action","from","parameterized","policy"]
code: def sample(self, cent_obs, obs, deterministic=False):
      """Sample action from parameterized policy"""
      policy = self.model.policy(obs)
  
      if not self.multi_discrete:
          action_dis = Categorical(logits=policy)
          if deterministic:
              actions = action_dis.probs.argmax(dim=-1, keepdim=True)
          else:
              actions = action_dis.sample().unsqueeze(-1)
          action_log_probs = (
              action_dis.log_prob(actions.squeeze(-1))
              .view(actions.size(0), -1)
              .sum(-1)
              .unsqueeze(-1)
          )
      else:
          actions = []
          action_log_probs = []
          for i in range(len(self.model.act_dim)):
              action_dis = Categorical(logits=policy[i])
              if deterministic:
                  action = action_dis.probs.argmax(dim=-1, keepdim=True)
              else:
                  action = action_dis.sample().unsqueeze(-1)
              action_log_prob = (
                  action_dis.log_prob(action.squeeze(-1))
                  .view(action.size(0), -1)
                  .sum(-1)
                  .unsqueeze(-1)
              )
              actions.append(action)
              action_log_probs.append(action_log_prob)
          actions = torch.cat(actions, -1)
          action_log_probs = torch.cat(action_log_probs, -1)
  
      values = self.model.value(cent_obs)
      return values, actions, action_log_probs
  
imports: import torch
  import torch.nn
  from torch.distributions import Categorical
  import numpy
  import parl
label_desc: Use image node_id 2 for calling the MAPPO obj's underlying member method code with example usage: obj.sample(cent_obs, obs, deterministic) and returns: values,  actions,  action_log_probs