code: def random_bool(probability_of_true):
      """Randomly return True or False based on the given probability.
  
      Useful for very noisy rules where you only want a sample of the matches.
  
      Args:
          probability_of_true (float): Probability that True should be returned (between 0 and 1).
  
      Returns:
          (bool) True or False
      """
      if probability_of_true < 0 or probability_of_true > 1:
          raise ValueError("Probability must be between 0.0 and 1.0")
      return random.random() <= probability_of_true
  
file_path: streamalert/rules/helpers/base.py
imports: from fnmatch import fnmatch
  import logging
  import json
  import random
  import time
  import pathlib2
  from streamalert.shared.utils import get_first_key, get_keys, in_network, valid_ip
label_desc: Use image node_id 12 for calling a global function with example usage: random_bool(probability_of_true) and returns: unknown