code: def get_common_path(pathlist):
      
      common = osp.normpath(osp.commonprefix(pathlist))
      if len(common) > 1:
          if not osp.isdir(common):
              return abspardir(common)
          else:
              for path in pathlist:
                  if not osp.isdir(osp.join(common, path[len(common)+1:])):
                      # `common` is not the real common prefix
                      return abspardir(common)
              else:
                  return osp.abspath(common)
docs: Return common path for all paths in pathlist