code: def chooseRangeValue(thresholds, rangeList):
      """Generate a random value based on the probability weights (thresholds) and list of ranges passed
      Args:
          thresholds : list of probabilities for each choice
          rangeList: a list of pair lists giving the lower and upper bounds to choose value from
      """
  
      # pick a number 1..3 from weights
      rangeVal = choices(Index3Population, thresholds)
  
      # get the appropriate range given rangeVal
      interval = rangeList[rangeVal[0]]
  
      # construct a population list from the result
      intervalPopulation = list(range(interval[0], interval[1]))
  
      # construct a equally prob weights list
      numElements = interval[1] - interval[0]
      probVal = 1.0 / numElements
      probList = [probVal] * numElements
  
      # now choose the value from the population based on the weights
      val = choices(intervalPopulation, probList)
      return val[0]
  
file_path: AIX360/aix360/data/ted_data/GenerateData.py
imports: import random
  from random import choices
  import pandas
label_desc: Use image node_id 6 for calling a global function with example usage: chooseRangeValue(thresholds, rangeList) and returns: val