code: def run_example(
      example_modules, example_name, environ, benchmark_returns=None
  ):
      """
      Run an example module from zipline.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,
          benchmark_returns=benchmark_returns,
          # 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 trading_calendars import register_calendar, get_calendar
  from zipline import run_algorithm
label_desc: Use image node_id 2 for calling a global function with example usage: run_example(example_modules, example_name, environ, benchmark_returns) and returns: run_algorithm