code: def parse_user_parameter(user_param):
      if isinstance(user_param, numbers.Real):
          return user_param
      elif isinstance(user_param, tuple):
          return random.sample(user_param, 1)[0]
      elif isinstance(user_param, list):
          return random.choice(np.arange(*user_param))
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  from builtins import *
  import os
  import glob
  import numbers
  import random
  import warnings
  import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: parse_user_parameter(user_param) and returns: user_param, random, random