code: def wrapped_random_choice(x, *args, **kwargs):
      try:
          return np.random.choice(x, *args, **kwargs)
      except:
          idxs = np.random.choice(len(x), *args, **kwargs)
          return type(x)([x[i] for i in idxs])
  
imports: import collections
  import itertools
  import string
  import numpy
  import re
  import copy
  import os
  import json
  import munch
  import pickle
  import csv
  from .viewer.template_editor import TemplateEditor
  from .multilingual import multilingual_params, get_language_code
label_desc: Use image node_id 9 for calling a global function with example usage: wrapped_random_choice(x) and returns: np, type