code: def shellglob(args):
      """
      Do glob expansion for each element in `args` and return a flattened list.
  
      Unmatched glob pattern will remain as-is in the returned list.
  
      """
      expanded = []
      # Do not unescape backslash in Windows as it is interpreted as
      # path separator:
      unescape = (
          unescape_glob if sys.platform != "win32" else lambda x: x
      )
      for a in args:
          expanded.extend(glob.glob(a) or [unescape(a)])
      return expanded
  
imports: import os
  import sys
  import errno
  import shutil
  import random
  import glob
  from IPython.utils.process import system
label_desc: Use image node_id 11 for calling a global function with example usage: shellglob(args) and returns: expanded