code: def clog2(num: int) -> int:
      r
      if num < 1:
          raise ValueError("expected num >= 1")
      accum, shifter = 0, 1
      while num > shifter:
          shifter <<= 1
          accum += 1
      return accum
docs: r"""Return the ceiling log base two of an integer :math:`\ge 1`.
  
      This function tells you the minimum dimension of a Boolean space with at
      least N points.
  
      For example, here are the values of ``clog2(N)`` for :math:`1 \le N < 18`:
  
      >>> [clog2(n) for n in range(1, 18)]
      [0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5]
  
      This function is undefined for non-positive integers:
  
      >>> clog2(0)
      Traceback (most recent call last):
          ...
      ValueError: expected num >= 1