code: def load_extensions(
      default, extensions, strict, environ, reload=False
  ):
      """Load all of the given extensions. This should be called by run_algo
      or the cli.
  
      Parameters
      ----------
      default : bool
          Load the default exension (~/.zipline/extension.py)?
      extension : iterable[str]
          The paths to the extensions to load. If the path ends in ``.py`` it is
          treated as a script and executed. If it does not end in ``.py`` it is
          treated as a module to be imported.
      strict : bool
          Should failure to load an extension raise. If this is false it will
          still warn.
      environ : mapping
          The environment to use to find the default extension path.
      reload : bool, optional
          Reload any extensions that have already been loaded.
      """
      if default:
          default_extension_path = pth.default_extension(
              environ=environ
          )
          pth.ensure_file(default_extension_path)
          # put the default extension first so other extensions can depend on
          # the order they are loaded
          extensions = concatv([default_extension_path], extensions)
  
      for ext in extensions:
          if ext in _loaded_extensions and not reload:
              continue
          try:
              # load all of the zipline extensionss
              if ext.endswith(".py"):
                  with open(ext) as f:
                      ns = {}
                      six.exec_(compile(f.read(), ext, "exec"), ns, ns)
              else:
                  __import__(ext)
          except Exception as e:
              if strict:
                  # if `strict` we should raise the actual exception and fail
                  raise
              # without `strict` we should just log the failure
              warnings.warn(
                  "Failed to load extension: %r\n%s" % (ext, e),
                  stacklevel=2,
              )
          else:
              _loaded_extensions.add(ext)
  
imports: import click
  import os
  import sys
  import warnings
  import logbook
  import pandas
  import six
  from toolz import concatv
  from trading_calendars import get_calendar
  from zipline.data import bundles
  from zipline.data.benchmarks import get_benchmark_returns_from_file
  from zipline.data.data_portal import DataPortal
  from zipline.finance import metrics
  from zipline.finance.trading import SimulationParameters
  from zipline.pipeline.data import USEquityPricing
  from zipline.pipeline.loaders import USEquityPricingLoader
  import zipline.utils.paths
  from zipline.extensions import load
  from zipline.errors import SymbolNotFound
  from zipline.algorithm import TradingAlgorithm, NoBenchmark
  from zipline.finance.blotter import Blotter
label_desc: Use image node_id 2 for calling a global function with example usage: load_extensions(default, extensions, strict, environ, reload) without return types