docs: def get_pipe_series_output(commands: Sequence[str],
                             stdinput: BinaryIO = None) -> bytes:
      """
      Get the output from a piped series of commands.
  
      Args:
          commands: sequence of command strings
          stdinput: optional ``stdin`` data to feed into the start of the pipe
  
      Returns:
          ``stdout`` from the end of the pipe
  
      """
      # Python arrays indexes are zero-based, i.e. an array is indexed from
      # 0 to len(array)-1.
      # The range/xrange commands, by default, start at 0 and go to one less
      # than the maximum specified.
  
      # print commands
      processes = []  # type: List[subprocess.Popen]
      for i in range(len(commands)):
          if i == 0:  # first processes
              processes.append(
                  subprocess.Popen(
                      shlex.split(commands[i]),
                      stdin=subprocess.PIPE,
                      stdout=subprocess.PIPE
                  )
              )
          else:  # subsequent ones
              processes.append(
                  subprocess.Popen(
                      shlex.split(commands[i]),
                      stdin=processes[i - 1].stdout,
                      stdout=subprocess.PIPE
                  )
              )
      return processes[len(processes) - 1].communicate(stdinput)[0]