code: def test_shell_completion_python():
      # largely a smoke test for our print("hello world")
      with swallow_outputs() as cmo:
          res = shell_completion()
          out = cmo.out.rstrip()
      # we get it printed and returned for double-pleasure
      eq_(out, res[0]["content"].rstrip())
  
imports: from datalad.api import shell_completion
  from datalad.cmd import WitlessRunner
  from datalad.tests.utils_pytest import assert_cwd_unchanged, eq_, skip_if_on_windows, swallow_outputs
label_desc: Use image node_id 1 for calling a global function with example usage: test_shell_completion_python() without return types