code: def create_algo(self, code, filename=None, sim_params=None):
      if sim_params is None:
          sim_params = self.sim_params
  
      return TradingAlgorithm(
          script=code,
          sim_params=sim_params,
          env=self.env,
          algo_filename=filename,
      )
  
imports: import warnings
  from mock import patch
  import numpy
  import pandas
  from pandas.core.common import PerformanceWarning
  from catalyst import TradingAlgorithm
  from catalyst.finance.trading import SimulationParameters
  from catalyst.testing import MockDailyBarReader, create_daily_df_for_asset, create_minute_df_for_asset, str_to_seconds
  from catalyst.testing.fixtures import WithCreateBarData, WithDataPortal, WithSimParams, CatalystTestCase
  from catalyst.catalyst_warnings import ZiplineDeprecationWarning
label_desc: Use image node_id 6 for calling the TestAPIShim obj's underlying member method code with example usage: obj.create_algo(code, filename, sim_params) and returns: TradingAlgorithm