code: def is_power2(num):
      """Test if number is a power of 2.
  
      Parameters
      ----------
      num : int
          Number.
  
      Returns
      -------
      b : bool
          True if is power of 2.
  
      Examples
      --------
      >>> is_power2(2 ** 3)
      True
      >>> is_power2(5)
      False
      """
      num = int(num)
      return num != 0 and ((num & (num - 1)) == 0)
  
imports: from collections import Counter
  from copy import deepcopy
  from functools import partial
  from math import gcd
  import numpy
  from scipy import fft, signal
  from scipy.stats import f
  from ._fiff.pick import _picks_to_idx
  from ._ola import _COLA
  from .cuda import _fft_multiply_repeated, _fft_resample, _setup_cuda_fft_multiply_repeated, _setup_cuda_fft_resample, _smart_pad
  from .parallel import parallel_func
  from .utils import _check_option, _check_preload, _ensure_int, _pl, _validate_type, logger, sum_squared, verbose, warn
label_desc: Use image node_id 1 for calling a global function with example usage: is_power2(num) and returns: unknown