code: def get_economic_data_history(
      self,
      start_date,
      finish_date,
      country_group,
      data_type,
      source="alfred",
      cache_algo="internet_load_return",
  ):
      logger = LoggerManager().getLogger(__name__)
  
      # vendor_country_codes = self.fred_country_codes[country_group]
      # vendor_pretty_country = self.fred_nice_country_codes[country_group]
  
      if isinstance(country_group, list):
          pretty_country_names = country_group
      else:
          # Get all the country names in the country_group
          pretty_country_names = list(
              self._econ_country_groups[
                  self._econ_country_groups["Country Group"]
                  == country_group
              ]["Country"]
          )
  
      # Construct the pretty tickers
      pretty_tickers = [
          x + "-" + data_type for x in pretty_country_names
      ]
  
      # Get vendor tickers
      vendor_tickers = []
  
      for pretty_ticker in pretty_tickers:
          vendor_ticker = list(
              self._all_econ_tickers[
                  self._all_econ_tickers["Full Code"] == pretty_ticker
              ][source].values
          )
  
          if vendor_ticker == []:
              vendor_ticker = None
              logger.error("Could not find match for " + pretty_ticker)
          else:
              vendor_ticker = vendor_ticker[0]
  
          vendor_tickers.append(vendor_ticker)
  
      vendor_fields = ["close"]
  
      if source == "bloomberg":
          vendor_fields = ["PX_LAST"]
  
      md_request = MarketDataRequest(
          start_date=start_date,  # start date
          finish_date=finish_date,  # finish date
          category="economic",
          freq="daily",  # daily data
          data_source=source,  # use Bloomberg as data source
          cut="LOC",
          tickers=pretty_tickers,
          fields=["close"],  # which fields to download
          vendor_tickers=vendor_tickers,
          vendor_fields=vendor_fields,  # which Bloomberg/data vendor fields to download
          cache_algo=cache_algo,
      )  # how to return data
  
      return self.market_data_generator.fetch_market_data(md_request)
  
imports: import math
  import numpy
  from pandas.tseries.offsets import CustomBusinessDay
  from findatapy.timeseries import Calculations, Timezone, Filter, Calendar
  import datetime
  from datetime import timedelta
  import numpy
  from finmarketpy.util.marketconstants import MarketConstants
  from findatapy.market import IOEngine
  from findatapy.util import ConfigManager
  from findatapy.market import SpeedCache
  import pandas
  from findatapy.market import MarketDataGenerator, MarketDataRequest
  from findatapy.util import DataConstants, LoggerManager
label_desc: Use image node_id 2 for calling the HistEconDataFactory obj's underlying member method code with example usage: obj.get_economic_data_history(start_date, finish_date, country_group, data_type, source, cache_algo) and returns: self