code: def get_bits_needed(n):
      
  
      assert n > 0, "Inout should be positive"
  
      num_bits = int(np.ceil(np.log2(n)))
      return max(1, num_bits)
docs: Calculates the smallest positive integer :math:`m` for which
      :math:`2^m\geq n`.
  
      :param int n: A positive integer
      :return: The positive integer :math:`m`, as specified above
      :rtype: int