code: def paths_for_shell(paths, separator=' '):
      
      paths = filter(None, paths)
      paths = map(shlex.quote, paths)
      if separator is None:
          return paths
      return separator.join(paths)
docs: Converts a list of paths for use in shell commands