code: def test_keep_logger():
      with tempfile.TemporaryDirectory() as tmpdir:
          path = os.path.join(tmpdir, "Snakefile")
          with open(path, "w") as f:
              print(
                  "rule:\n  output: 'result.txt'\n  shell: 'touch {output}'",
                  file=f,
              )
          snakemake(path, workdir=tmpdir, keep_logger=True)
  
file_path: snakemake/tests/testapi.py
imports: from snakemake.api import snakemake
  import asyncio
  import sys
  import tempfile
  import os.path
  from textwrap import dedent
label_desc: Use image node_id 1 for calling a global function with example usage: test_keep_logger() without return types