code: def _run_cmd(cmds):
      
      if not isinstance(cmds, str):
          cmds = "".join(cmds)
      print("Execute \"%s\"" % cmds)
      try:
          subprocess.check_call(cmds, shell=True)
      except subprocess.CalledProcessError as err:
          print(err)
          raise err
docs: Run commands, raise exception if failed