code: def commonpath(paths):
      assert paths
      if len(paths) == 1:
          return next(iter(paths))
  
      split_paths = [path.split(os.sep) for path in paths]
      smin = min(split_paths)
      smax = max(split_paths)
  
      common = smin
      for i, c in enumerate(smin):
          if c != smax[i]:
              common = smin[:i]
              break
  
      return os.path.sep.join(common)
  
imports: import codecs
  import errno
  import logging
  import os
  import random
  import shutil
  import six
  import stat
  import sys
  import library.python.func
  import library.python.strings
  import library.python.windows
label_desc: Use image node_id 30 for calling a global function with example usage: commonpath(paths) and returns: os, next