code: def _main(args, cls):
      """Unprotected portion"""
      assert cls is not None
      from annexremote import Master
  
      master = Master()
      remote = cls(master)
      master.LinkRemote(remote)
      master.Listen()
      # cleanup
      if hasattr(remote, "stop"):
          remote.stop()
  
imports: import argparse
  from datalad.cli.parser import parser_add_common_opt, parser_add_version_opt
  from datalad.cli.utils import setup_exceptionhook
  from datalad.ui import ui
  import logging
label_desc: Use image node_id 2 for calling a global function with example usage: _main(args, cls) without return types