class_docstr: Defines a configuration class from which a new A2C can be built.
  
  Example:
      >>> from ray import tune
      >>> from ray.rllib.algorithms.a2c import A2CConfig
      >>> config = A2CConfig()
      >>> config = config.training(lr=0.01, grad_clip=30.0)  # doctest: +SKIP
      >>> config = config.resources(num_gpus=0)  # doctest: +SKIP
      >>> config = config.rollouts(num_rollout_workers=2)  # doctest: +SKIP
      >>> config = config.environment("CartPole-v1")  # doctest: +SKIP
      >>> print(config.to_dict())  # doctest: +SKIP
      >>> # Build a Algorithm object from the config and run 1 training iteration.
      >>> algo = config.build()  # doctest: +SKIP
      >>> algo.train()  # doctest: +SKIP
  
  Example:
      >>> import ray.air as air
      >>> from ray import tune
      >>> from ray.rllib.algorithms.a2c import A2CConfig
      >>> config = A2CConfig()
      >>> # Print out some default values.
      >>> print(config.sample_async)   # doctest: +SKIP
      >>> # Update the config object.
      >>> config = config.training(lr=tune.grid_search(  # doctest: +SKIP
      ...     [0.001, 0.0001]), use_critic=False)
      >>> # Set the config object's env.
      >>> config = config.environment(env="CartPole-v1")  # doctest: +SKIP
      >>> # Use to_dict() to get the old-style python config dict
      >>> # when running with tune.
      >>> tune.Tuner(  # doctest: +SKIP
      ...     "A2C",
      ...     run_config=air.RunConfig(stop={"episode_reward_mean": 200}),
      ...     param_space=config.to_dict(),
      ... ).fit()
code: def get_rollout_fragment_length(self, worker_index: int = 0) -> int:
      if self.rollout_fragment_length == "auto":
          if self.microbatch_size:
              return self.microbatch_size
      return super().get_rollout_fragment_length(worker_index)
  
imports: import logging
  import math
  from typing import Optional
  from ray.rllib.algorithms.a3c.a3c import A3C, A3CConfig
  from ray.rllib.algorithms.algorithm import Algorithm
  from ray.rllib.algorithms.algorithm_config import AlgorithmConfig, NotProvided
  from ray.rllib.execution.rollout_ops import synchronous_parallel_sample
  from ray.rllib.policy.sample_batch import DEFAULT_POLICY_ID
  from ray.rllib.utils.annotations import override
  from ray.rllib.utils.metrics import APPLY_GRADS_TIMER, COMPUTE_GRADS_TIMER, NUM_AGENT_STEPS_SAMPLED, NUM_AGENT_STEPS_TRAINED, NUM_ENV_STEPS_SAMPLED, NUM_ENV_STEPS_TRAINED, SAMPLE_TIMER, SYNCH_WORKER_WEIGHTS_TIMER
  from ray.rllib.utils.typing import ResultDict
label_desc: Use image node_id 4 for calling the A2CConfig obj's underlying member method code with example usage: obj.get_rollout_fragment_length(worker_index) and returns: super, self