code: def _retrace_weights(pi_probs, mu_probs):
      """Evaluates importance weights for the Retrace algorithm.
  
      Args:
        pi_probs: taken action probabilities according to target policy.
          Shape is `[T, B]`.
        mu_probs: taken action probabilities according to behaviour policy.
          Shape is `[T, B]`.
  
      Returns:
        Tensor of shape `[T, B]` containing importance weights.
      """
      # tf.minimum seems to handle potential NaNs when pi_probs[i]=mu_probs[i]=0
      return tf.minimum(1.0, pi_probs / mu_probs)
  
file_path: trfl/trfl/retrace_ops.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  from six.moves import zip
  import tensorflow.compat.v1
  from trfl import base_ops
  from trfl import indexing_ops
  from trfl import sequence_ops
label_desc: Use image node_id 3 for calling a global function with example usage: _retrace_weights(pi_probs, mu_probs) and returns: tf