code: def _random_choice(x):
      if len(x) < 1:
          msg = "Range of random choice should have some elements, got nothing"
          logger.fatal(msg)
          raise ValueError(msg)
      return lambda: x[random.choice(len(x))]
  
file_path: auptimizer/src/aup/Proposer/RandomProposer.py
imports: import logging
  from numpy import random
  from six.moves import input
  from .AbstractProposer import AbstractProposer
  from ..utils import check_missing_key, set_default_keyvalue
label_desc: Use image node_id 3 for calling a global function with example usage: _random_choice(x) and returns: function