code: def run_example(example_name, environ):
      """
      Run an example module from catalyst.examples.
      """
      mod = EXAMPLE_MODULES[example_name]
  
      register_calendar("YAHOO", get_calendar("NYSE"), force=True)
  
      return run_algorithm(
          initialize=getattr(mod, "initialize", None),
          handle_data=getattr(mod, "handle_data", None),
          before_trading_start=getattr(
              mod, "before_trading_start", None
          ),
          analyze=getattr(mod, "analyze", None),
          bundle="test",
          environ=environ,
          # Provide a default capital base, but allow the test to override.
          **merge({"capital_base": 1e7}, mod._test_args()),
      )
  
imports: from importlib import import_module
  import os
  from toolz import merge
  from catalyst import run_algorithm
  from catalyst.utils.calendars import register_calendar, get_calendar
label_desc: Use image node_id 1 for calling a global function with example usage: run_example(example_name, environ) and returns: run_algorithm