class_docstr: A neural-network based bandit agent for multi-objective optimization.
  
  This agent receives multiple neural networks. Each network will be trained by
  the agent to predict a specific objective. The agent also receives a
  Scalarizer, which transforms multiple predicted objectives to a single reward.
  The action is chosen greedily by the policy with respect to the scalarized
  predicted reward.
code: def _train(
      self, experience: types.NestedTensor, weights: types.Tensor
  ) -> tf_agent.LossInfo:
      experience = self._as_trajectory(experience)
  
      with tf.GradientTape() as tape:
          loss_info = self._loss(
              experience, weights=weights, training=True
          )
  
      variables_to_train = self._variables_to_train()
      if not variables_to_train:
          logging.info("No variable to train in the agent.")
          return loss_info
  
      grads = tape.gradient(loss_info.loss, variables_to_train)
      # Tuple is used for py3, where zip is a generator producing values once.
      grads_and_vars = tuple(zip(grads, variables_to_train))
      if self._gradient_clipping is not None:
          grads_and_vars = eager_utils.clip_gradient_norms(
              grads_and_vars, self._gradient_clipping
          )
  
      if self._summarize_grads_and_vars:
          eager_utils.add_variables_summaries(
              grads_and_vars, self.train_step_counter
          )
          eager_utils.add_gradients_summaries(
              grads_and_vars, self.train_step_counter
          )
  
      self._optimizer.apply_gradients(grads_and_vars)
      self.train_step_counter.assign_add(1)
  
      return loss_info
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from typing import Callable, Optional, Sequence, Text, Tuple
  from absl import logging
  import gin
  import tensorflow
  from tf_agents.agents import data_converter
  from tf_agents.agents import tf_agent
  from tf_agents.bandits.agents import utils
  from tf_agents.bandits.multi_objective import multi_objective_scalarizer
  from tf_agents.bandits.networks import heteroscedastic_q_network
  from tf_agents.bandits.policies import greedy_multi_objective_neural_policy
  from tf_agents.bandits.specs import utils
  from tf_agents.networks.network import Network
  from tf_agents.policies import utils
  from tf_agents.trajectories import time_step
  from tf_agents.typing import types
  from tf_agents.utils import common
  from tf_agents.utils import eager_utils
label_desc: Use image node_id 4 for calling the GreedyMultiObjectiveNeuralAgent obj's underlying member method code with example usage: obj._train(experience, weights) and returns: loss_info, loss_info