<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _invoke(cls, cmd):
 """Invoke the given command, and return a tuple of process and raw binary output. stderr flows to wherever its currently mapped for the parent process - generally to the terminal where the user can see the error. :param list cmd: The command in the form of a list of strings :returns: The completed process object and its standard output. :raises: Scm.LocalException if there was a problem exec'ing the command at all. """

    try:
      process = subprocess.Popen(cmd, stdout=subprocess.PIPE)
    except OSError as e:
      # Binary DNE or is not executable
      raise cls.LocalException('Failed to execute command {}: {}'.format(' '.join(cmd), e))
    out, _ = process.communicate()
    return process, out