code: def _base_expansion_size(num, bases, dtype):
      """Computes the number of terms in the place value expansion.
  
      Let num = a0 + a1 b + a2 b^2 + ... ak b^k be the place value expansion of
      `num` in base b (ak <> 0). This function computes and returns `k+1` for each
      base `b` specified in `bases`.
  
      This can be inferred from the base `b` logarithm of `num` as follows:
        $$k = Floor(log_b (num)) + 1  = Floor( log(num) / log(b)) + 1$$
  
      Args:
        num: Scalar `Tensor` of dtype either `int32` or `int64`. The number to
          compute the base expansion size of.
        bases: `Tensor` of the same dtype as num. The bases to compute the size
          against.
        dtype: Return `dtype`.
  
      Returns:
        Tensor of dtype `dtype` and shape as `bases` containing the size of num when
        written in that base.
      """
      num_ = tf.get_static_value(num)
      if num_ is not None:
          return (np.floor(np.log(num_) / np.log(bases)) + 1).astype(
              dtype_util.as_numpy_dtype(dtype)
          )
  
      return (
          tf.floor(
              tf.math.log(tf.cast(num, dtype))
              / tf.math.log(tf.cast(bases, dtype))
          )
          + 1
      )
  
file_path: probability/tensorflow_probability/python/mcmc/sample_halton_sequence_lib.py
imports: import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import samplers
label_desc: Use image node_id 5 for calling a global function with example usage: _base_expansion_size(num, bases, dtype) and returns: unknown, unknown