code: def run_algo(self, code, sim_params=None, data_frequency="daily"):
      if sim_params is None:
          sim_params = self.sim_params
  
      test_algo = TradingAlgorithm(
          script=code,
          sim_params=sim_params,
          env=self.env,
          data_frequency=data_frequency,
      )
  
      results = test_algo.run(
          FetcherDataPortal(self.env, self.trading_calendar)
      )
  
      return results
  
imports: from nose_parameterized import parameterized
  import pandas
  import numpy
  from mock import patch
  from catalyst import TradingAlgorithm
  from catalyst.errors import UnsupportedOrderParameters
  from catalyst.sources.requests_csv import mask_requests_args
  from catalyst.utils import factory
  from catalyst.testing import FetcherDataPortal
  from catalyst.testing.fixtures import WithResponses, WithSimParams, CatalystTestCase
  from .resources.fetcher_inputs.fetcher_test_data import AAPL_CSV_DATA, AAPL_IBM_CSV_DATA, AAPL_MINUTE_CSV_DATA, CPIAUCSL_DATA, FETCHER_ALTERNATE_COLUMN_HEADER, FETCHER_UNIVERSE_DATA, FETCHER_UNIVERSE_DATA_TICKER_COLUMN, MULTI_SIGNAL_CSV_DATA, NON_ASSET_FETCHER_UNIVERSE_DATA, PALLADIUM_DATA, NFLX_DATA
label_desc: Use image node_id 2 for calling the FetcherTestCase obj's underlying member method code with example usage: obj.run_algo(code, sim_params, data_frequency) and returns: results