class_docstr: A Starcraft II environment.
  
  The implementation details of the action and observation specs are in
  lib/features.py
docstr: Apply action delays to the requested actions, if configured to.
docstr_tok: ["Apply","action","delays","to","the","requested","actions",",","if","configured","to","."]
code: def _apply_action_delays(self, actions):
      """Apply action delays to the requested actions, if configured to."""
      assert not self._realtime
      actions_now = []
      for actions_for_player, delay_fn, delayed_actions in zip(
          actions, self._action_delay_fns, self._delayed_actions
      ):
          actions_now_for_player = []
  
          for action in actions_for_player:
              delay = delay_fn() if delay_fn else 1
              if delay > 1 and action.ListFields():  # Skip no-ops.
                  game_loop = self._episode_steps + delay - 1
  
                  # Randomized delays mean that 2 delay actions can be reversed.
                  # Make sure that doesn't happen.
                  if delayed_actions:
                      game_loop = max(
                          game_loop, delayed_actions[-1].game_loop
                      )
  
                  # Don't send an action this frame.
                  delayed_actions.append(
                      _DelayedAction(game_loop, action)
                  )
              else:
                  actions_now_for_player.append(action)
          actions_now.append(actions_now_for_player)
  
      return actions_now
  
imports: import collections
  import copy
  import random
  import time
  from absl import logging
  from pysc2 import maps
  from pysc2 import run_configs
  from pysc2.env import enums
  from pysc2.env import environment
  from pysc2.lib import actions
  from pysc2.lib import features
  from pysc2.lib import metrics
  from pysc2.lib import portspicker
  from pysc2.lib import renderer_human
  from pysc2.lib import run_parallel
  from pysc2.lib import stopwatch
  from s2clientprotocol import sc2api_pb2
label_desc: Use image node_id 16 for calling the SC2Env obj's underlying member method code with example usage: obj._apply_action_delays(actions) and returns: actions_now