code: def run_shell_command(commands, **kwargs):
      
      p = subprocess.Popen(commands,
                           stdout=subprocess.PIPE,
                           stderr=subprocess.PIPE,
                           **kwargs)
      output, error = p.communicate()
      return p.returncode, output, error
docs: Run a shell command.