code: def test_erroring_out():
      class TooAbstract(AnnexCustomRemote):
          pass
  
      # patch to not let `main` change the ui.backend
      # of the test process (instead of a special remote process it is actually
      # targeting)
      with swallow_logs(
          new_level=logging.DEBUG
      ) as cml, swallow_outputs() as cmo:
          with pytest.raises(SystemExit) as cme, patch.object(
              ui, "set_backend", autospec=True
          ):
              main(args=[], cls=TooAbstract)
          assert cme.value.code == 1
          assert "passing ERROR to git-annex" in cml.out
          # verify basic correct formatting of string to git-annex
          assert cmo.out.startswith("ERROR ")
          assert os.linesep not in cmo.out.rstrip()
          assert cmo.out.endswith("\n")
  
imports: import logging
  import os
  import pytest
  from ..main import main
  from ..base import AnnexCustomRemote
  from datalad.tests.utils_pytest import patch, swallow_logs, swallow_outputs
  from datalad.ui import ui
label_desc: Use image node_id 1 for calling a global function with example usage: test_erroring_out() without return types