code: def random(prob):
      """Returns True with probability `prob`.
  
      Exploration controller to indicate it's time to take a random action.
  
      Args:
        prob: triggering probability. If prob > random, then returns True.
  
      Raises:
        ValueError: if prob is not bounded in [0, 1].
      """
      # 1.00001 to guard against numerical precision errors.
      if prob < 0 or prob > 1.00001:
          raise ValueError(
              "phoenix_spec.increase_complexity_probility must be in [0, 1]"
          )
      return np.random.random() < prob
  
file_path: model_search/model_search/search/common.py
imports: import os
  from model_search import block_builder
  from model_search.architecture import architecture_utils
  import numpy
  import tensorflow.compat.v2
label_desc: Use image node_id 1 for calling a global function with example usage: random(prob) and returns: unknown