code: def load_magics(ip):
      ip.register_magics(TimerMagic)
      ip.register_magics(OutputMagic)
  
      docstring = Store.output_settings._generate_docstring()
      OutputMagic.output.__doc__ = docstring
  
      if pyparsing is None:
          print(
              "%opts magic unavailable (pyparsing cannot be imported)"
          )
      else:
          ip.register_magics(OptsMagic)
  
      if pyparsing is None:
          print(
              "%compositor magic unavailable (pyparsing cannot be imported)"
          )
      else:
          ip.register_magics(CompositorMagic)
  
      # Configuring tab completion
      ip.set_hook(
          "complete_command",
          TimerMagic.option_completer,
          str_key="%timer",
      )
      ip.set_hook(
          "complete_command",
          CompositorMagic.option_completer,
          str_key="%compositor",
      )
  
      ip.set_hook(
          "complete_command",
          OutputMagic.option_completer,
          str_key="%output",
      )
      ip.set_hook(
          "complete_command",
          OutputMagic.option_completer,
          str_key="%%output",
      )
  
      OptsCompleter.setup_completer()
      ip.set_hook(
          "complete_command",
          OptsCompleter.option_completer,
          str_key="%%opts",
      )
      ip.set_hook(
          "complete_command",
          OptsCompleter.option_completer,
          str_key="%opts",
      )
  
imports: import sys
  import time
  from IPython.core.magic import Magics, line_cell_magic, line_magic, magics_class
  from IPython.display import HTML, display
  from ..core.options import Options, Store, StoreOptions, options_policy
  from ..core.pprint import InfoPrinter
  from ..operation import Compositor
  from IPython.core import page
label_desc: Use image node_id 1 for calling a global function with example usage: load_magics(ip) without return types