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 (~/.catalyst/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 catalyst extensionss
              if ext.endswith(".py"):
                  run_path(ext, run_name="<extension>")
              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 os
  import re
  import sys
  import warnings
  from datetime import timedelta
  from runpy import run_path
  from time import sleep
  import click
  import pandas
  from six import string_types
  import catalyst
  from catalyst.data.bundles import load
  from catalyst.data.data_portal import DataPortal
  from catalyst.exchange.exchange_pricing_loader import ExchangePricingLoader, TradingPairPricing
  from catalyst.exchange.utils.factory import get_exchange
  from logbook import Logger
  from toolz import valfilter, concatv
  from functools import partial
  from catalyst.finance.trading import TradingEnvironment
  from catalyst.utils.calendars import get_calendar
  from catalyst.utils.factory import create_simulation_parameters
  from catalyst.data.loader import load_crypto_market_data
  import catalyst.utils.paths
  from catalyst.utils.remote import remote_backtest
  from catalyst.exchange.exchange_algorithm import ExchangeTradingAlgorithmLive, ExchangeTradingAlgorithmBacktest
  from catalyst.exchange.exchange_data_portal import DataPortalExchangeLive, DataPortalExchangeBacktest
  from catalyst.exchange.exchange_asset_finder import ExchangeAssetFinder
  from catalyst.constants import LOG_LEVEL, ALPHA_WARNING_MESSAGE, DISABLE_ALPHA_WARNING
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