code: def add_cmd_context_handler(on_enter, on_exit):
      CmdContext._handlers.append((on_enter, on_exit))
  
imports: import contextlib
  import functools
  import json
  import os
  import re
  import click
  from click import shell_completion
  import guild
  from guild import python_util
label_desc: Use image node_id 3 for calling a global function with example usage: add_cmd_context_handler(on_enter, on_exit) without return types