code: def test_currency_convert_prices(self, name, domain, calendar_name):
      # Test running a pipeline on a domain whose assets are all denominated
      # in the same currency.
  
      pipe = Pipeline(
          {
              "close": EquityPricing.close.latest,
              "close_USD": EquityPricing.close.fx("USD").latest,
              "close_CAD": EquityPricing.close.fx("CAD").latest,
              "close_EUR": EquityPricing.close.fx("EUR").latest,
              "close_GBP": EquityPricing.close.fx("GBP").latest,
          },
          domain=domain,
      )
  
      sessions = self.daily_bar_sessions[calendar_name]
  
      # The dates here are arbitrary. We're just running a couple days in the
      # middle of the data that's configured in this suite.
      execution_sessions = sessions[-17:-9]
      start, end = execution_sessions[[0, -1]]
      result = self.run_pipeline(pipe, start, end)
  
      # Raw closes as a (dates, assets) dataframe.
      closes_2d = result["close"].unstack(fill_value=np.nan)
  
      # Currency codes for all sids on this domain.
      all_currency_codes = self.daily_bar_currency_codes[calendar_name]
  
      # Currency codes for sids in the pipeline result.
      currency_codes = all_currency_codes.loc[
          [a.sid for a in closes_2d.columns]
      ]
  
      # For each possible target currency, we should be able to reconstruct
      # the currency-converted pipeline result by manually fetching exchange
      # rate values and multiplying by the unconverted pricing values.
      fx_reader = self.in_memory_fx_rate_reader
      for target in self.FX_RATES_CURRENCIES:
          # Closes, converted to target currency, as reported by pipeline, as
          # a (dates, assets) dataframe.
          result_2d = result["close_" + target].unstack(
              fill_value=np.nan
          )
  
          # (dates, sids) dataframe giving the exchange rate from each
          # asset's currency to the target currency.
          expected_rates = fx_reader.get_rates(
              rate="mid",
              quote=target,
              bases=np.array(currency_codes, dtype=object),
              # Exchange rates used for pipeline output with label N should
              # be from day N - 1, so shift back from `execution_sessions` by
              # a day.
              dts=sessions[-18:-10],
          )
  
          expected_result_2d = closes_2d * expected_rates
  
          assert_equal(result_2d, expected_result_2d)
  
imports: from itertools import cycle, islice
  from nose_parameterized import parameterized
  import numpy
  import pandas
  from trading_calendars import get_calendar
  from zipline.assets.synthetic import make_rotating_equity_info
  from zipline.data.in_memory_daily_bars import InMemoryDailyBarReader
  from zipline.pipeline.domain import CA_EQUITIES, GB_EQUITIES, US_EQUITIES
  from zipline.pipeline import Pipeline
  from zipline.pipeline.data import EquityPricing, USEquityPricing
  from zipline.pipeline.engine import SimplePipelineEngine
  from zipline.pipeline.loaders.equity_pricing_loader import EquityPricingLoader
  from zipline.pipeline.loaders.synthetic import NullAdjustmentReader
  from zipline.testing.predicates import assert_equal
  from zipline.testing.core import parameter_space, random_tick_prices
  import zipline.testing.fixtures
label_desc: Use image node_id 4 for calling the InternationalEquityTestCase obj's underlying member method code with example usage: obj.test_currency_convert_prices(name, domain, calendar_name) without return types