code: def escape_grouped_arguments(s):
      
      if s is None:
          return None
  
      # Additional escaping for windows paths
      if os.name == "nt":
          s = "{}".format(s.replace("\\", "\\\\"))
      return '"' + s.replace("'", "'\\''") + '"'
docs: Prepares a string for the shell (on Windows too!)
  
      Only for use on grouped arguments (passed as a string to Popen)