code: def _base_expansion_size(num, bases):
      """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 numpy array of dtype either `float32` or `float64`. The number
          to compute the base expansion size of.
        bases: Numpy array of the same dtype as num. The bases to compute the size
          against.
  
      Returns:
        Tensor of same dtype and shape as `bases` containing the size of num when
        written in that base.
      """
      return np.floor(np.log(num) / np.log(bases)) + 1
  
file_path: tf-quant-finance/tf_quant_finance/math/random_ops/halton/halton_impl.py
imports: import numpy
  import tensorflow.compat.v2
  from tf_quant_finance import types
  from tf_quant_finance import utils
  from tf_quant_finance.math.random_ops import stateless
label_desc: Use image node_id 5 for calling a global function with example usage: _base_expansion_size(num, bases) and returns: unknown