class_docstr: Implements DreamerV3 losses and gradient-based update logic in TensorFlow.
  
  The critic EMA-copy update step can be found in the `DreamerV3Learner` base class,
  as it is framework independent.
  
  We define 3 local TensorFlow optimizers for the sub components "world_model",
  "actor", and "critic". Each of these optimizers might use a different learning rate,
  epsilon parameter, and gradient clipping thresholds and procedures.
code: def compute_gradients(
      self,
      loss_per_module,
      gradient_tape,
      **kwargs,
  ):
      # Override of the default gradient computation method.
      # For DreamerV3, we need to compute gradients over the individual loss terms
      # as otherwise, the world model's parameters would have their gradients also
      # be influenced by the actor- and critic loss terms/gradient computations.
      grads = {}
      for component in ["world_model", "actor", "critic"]:
          grads.update(
              gradient_tape.gradient(
                  # Take individual loss term from the registered metrics for
                  # the main module.
                  self._metrics[DEFAULT_POLICY_ID][
                      component.upper() + "_L_total"
                  ],
                  self.filter_param_dict_for_optimizer(
                      self._params,
                      self.get_optimizer(optimizer_name=component),
                  ),
              )
          )
      del gradient_tape
      return grads
  
imports: from typing import Any, Dict, Tuple
  import gymnasium
  from ray.rllib.algorithms.dreamerv3.dreamerv3 import DreamerV3Config
  from ray.rllib.algorithms.dreamerv3.dreamerv3_learner import DreamerV3Learner
  from ray.rllib.core.learner.learner import ParamDict
  from ray.rllib.core.learner.tf.tf_learner import TfLearner
  from ray.rllib.policy.sample_batch import DEFAULT_POLICY_ID, SampleBatch
  from ray.rllib.utils.annotations import override
  from ray.rllib.utils.deprecation import deprecation_warning
  from ray.rllib.utils.framework import try_import_tf, try_import_tfp
  from ray.rllib.utils.tf_utils import symlog, two_hot, clip_gradients
  from ray.rllib.utils.typing import ModuleID, TensorType
label_desc: Use image node_id 3 for calling the DreamerV3TfLearner obj's underlying member method code with example usage: obj.compute_gradients(loss_per_module, gradient_tape) and returns: grads