docs: def _run_command(
      command,
      input_data=None,
      stdin=None,
      out_pipe=subprocess.PIPE,
      err_pipe=subprocess.PIPE,
      env=None,
      uuid=None,
      **kwargs
  ):
      """
      Runs a command
  
      Args:
          command(list of str): args of the command to execute, including the
              command itself as command[0] as `['ls', '-l']`
          input_data(str): If passed, will feed that data to the subprocess
              through stdin
          out_pipe(int or file): File descriptor as passed to
              :ref:subprocess.Popen to use as stdout
          stdin(int or file): File descriptor as passed to
              :ref:subprocess.Popen to use as stdin
          err_pipe(int or file): File descriptor as passed to
              :ref:subprocess.Popen to use as stderr
          env(dict of str:str): If set, will use the given dict as env for the
              subprocess
          uuid(uuid): If set the command will be logged with the given uuid
              converted to string, otherwise, a uuid v4 will be generated.
          **kwargs: Any other keyword args passed will be passed to the
              :ref:subprocess.Popen call
  
      Returns:
          lago.utils.CommandStatus: result of the interactive execution
      """
  
      # add libexec to PATH if needed
      if uuid is None:
          uuid = uuid_m.uuid4()
  
      if constants.LIBEXEC_DIR not in os.environ['PATH'].split(':'):
          os.environ['PATH'
                     ] = '%s:%s' % (constants.LIBEXEC_DIR, os.environ['PATH'])
  
      if input_data and not stdin:
          kwargs['stdin'] = subprocess.PIPE
      elif stdin:
          kwargs['stdin'] = stdin
  
      if env is None:
          env = os.environ.copy()
      else:
          env['PATH'] = ':'.join(
              list(
                  set(
                      env.get('PATH', '').split(':') + os.environ['PATH']
                      .split(':')
                  ),
              ),
          )
  
      popen = subprocess.Popen(
          ' '.join('"%s"' % arg for arg in command),
          stdout=out_pipe,
          stderr=err_pipe,
          shell=True,
          env=env,
          **kwargs
      )
      out, err = popen.communicate(input_data)
      LOGGER.debug(
          '%s: command exit with return code: %d', str(uuid), popen.returncode
      )
      if out:
          LOGGER.debug('%s: command stdout: %s', str(uuid), out)
      if err:
          LOGGER.debug('%s: command stderr: %s', str(uuid), err)
      return CommandStatus(popen.returncode, out, err)