code: def _normalize_cmd_args(cmd):
      
      if isinstance(cmd, basestring):
          # check for standard or anonymous named pipes
          if cmd.find(" | ") > 0 or cmd.find(">(") or cmd.find("<("):
              return "set -o pipefail; " + cmd, True, find_bash()
          else:
              return cmd, True, None
      else:
          return [str(x) for x in cmd], False, None
docs: Normalize subprocess arguments to handle list commands, string and pipes.
      Piped commands set pipefail and require use of bash to help with debugging
      intermediate errors.