docstr: Build the TfLearner.
  
  This method is specific TfLearner. Before running super() it sets the correct
  distributing strategy with the right device, so that computational graph is
  placed on the correct device. After running super(), depending on eager_tracing
  flag it will decide whether to wrap the update function with tf.function or not.
docstr_tok: ["Build","the","TfLearner",".","This","method","is","specific","TfLearner",".","Before","running","super","(",")","it","sets","the","correct","distributing","strategy","with","the","right","device",",","so","that","computational","graph","is","placed","on","the","correct","device",".","After","running","super","(",")",",","depending","on","eager_tracing","flag","it","will","decide","whether","to","wrap","the","update","function","with","tf.function","or","not","."]
code: def build(self) -> None:
      """Build the TfLearner.
  
      This method is specific TfLearner. Before running super() it sets the correct
      distributing strategy with the right device, so that computational graph is
      placed on the correct device. After running super(), depending on eager_tracing
      flag it will decide whether to wrap the update function with tf.function or not.
      """
  
      # we call build anytime we make a learner, or load a learner from a checkpoint.
      # we can't make a new strategy every time we build, so we only make one the
      # first time build is called.
      if not self._strategy:
          self._strategy = (
              self._make_distributed_strategy_if_necessary()
          )
  
      with self._strategy.scope():
          super().build()
  
      if self._enable_tf_function:
          self._possibly_traced_update = tf.function(
              self._untraced_update, reduce_retracing=True
          )
      else:
          self._possibly_traced_update = self._untraced_update
  
imports: import json
  import logging
  import pathlib
  from typing import Any, Callable, Dict, Hashable, Sequence, Tuple, TYPE_CHECKING, Union
  from ray.rllib.core.learner.learner import Learner
  from ray.rllib.core.rl_module.rl_module import RLModule, SingleAgentRLModuleSpec
  from ray.rllib.core.rl_module.tf.tf_rl_module import TfRLModule
  from ray.rllib.policy.eager_tf_policy import _convert_to_tf
  from ray.rllib.policy.sample_batch import MultiAgentBatch
  from ray.rllib.utils.annotations import override, OverrideToImplementCustomLogic
  from ray.rllib.utils.deprecation import deprecation_warning
  from ray.rllib.utils.framework import try_import_tf
  from ray.rllib.utils.metrics import ALL_MODULES
  from ray.rllib.utils.nested_dict import NestedDict
  from ray.rllib.utils.serialization import convert_numpy_to_python_primitives
  from ray.rllib.utils.typing import ModuleID, Optimizer, Param, ParamDict, TensorType
label_desc: Use image node_id 23 for calling the TfLearner obj's underlying member method code with example usage: obj.build() without return types