code: def power2_or_log_uniform(low, high, q):
      """Samples uniform powers of 2 or values divisible by q from [low, high]."""
      # The overall CDF is log-linear because range in log_uniform is (q/2, high]
      f = type(q)(power2_uniform(low, high, low))
      f = log_uniform(max(low, q), high, min(high, q)) if f >= q else f
      return f
  
file_path: pycls/pycls/sweep/random.py
imports: from decimal import Decimal
  import matplotlib.pyplot
  import numpy
label_desc: Use image node_id 5 for calling a global function with example usage: power2_or_log_uniform(low, high, q) and returns: f