parameters: (self, state)
return_statement: return list(policy.items()), action
docstring: Returns the stochastic policy and selected action in the given state.
  
      Args:
        state: The current state of the game.
  
      Returns:
        A `(policy, action)` pair, where policy is a `list` of
        `(action, probability)` pairs for each legal action, with
        `probability` defined by the policy action probabilities.
        The `action` is sampled from the distribution,
        or `pyspiel.INVALID_ACTION` if there are no actions available.
docstring_summary: Returns the stochastic policy and selected action in the given state.
docstring_tokens: Returns the stochastic policy and selected action in the given state .
function: def step_with_policy(self, state):
      """Returns the stochastic policy and selected action in the given state.
  
      Args:
        state: The current state of the game.
  
      Returns:
        A `(policy, action)` pair, where policy is a `list` of
        `(action, probability)` pairs for each legal action, with
        `probability` defined by the policy action probabilities.
        The `action` is sampled from the distribution,
        or `pyspiel.INVALID_ACTION` if there are no actions available.
      """
      policy = self._policy.action_probabilities(state, self._player_id)
      action_list = list(policy.keys())
      if not any(action_list):
        return [], pyspiel.INVALID_ACTION
  
      action = self._rng.choice(action_list, p=list(policy.values()))
      return list(policy.items()), action
function_tokens: def step_with_policy ( self , state ) : policy = self . _policy . action_probabilities ( state , self . _player_id ) action_list = list ( policy . keys ( ) ) if not any ( action_list ) : return [ ] , pyspiel . INVALID_ACTION action = self . _rng . choice ( action_list , p = list ( policy . values ( ) ) ) return list ( policy . items ( ) ) , action