code: def __init__(self, barFeed, frequency, maxLen=None):
      super(ResampledBarFeed, self).__init__(frequency, maxLen)
  
      if not isinstance(barFeed, barfeed.BaseBarFeed):
          raise Exception(
              "barFeed must be a barfeed.BaseBarFeed instance"
          )
  
      if not resamplebase.is_valid_frequency(frequency):
          raise Exception("Unsupported frequency")
  
      # Register the same instruments as in the underlying barfeed.
      for instrument in barFeed.getRegisteredInstruments():
          self.registerInstrument(instrument)
  
      self.__values = []
      self.__barFeed = barFeed
      self.__grouper = None
      self.__range = None
  
      barFeed.getNewValuesEvent().subscribe(self.__onNewValues)
  
imports: from pyalgotrade import barfeed
  from pyalgotrade.dataseries import resampled
  from pyalgotrade import resamplebase
  from pyalgotrade import bar
label_desc: Use image node_id 1 to create a new ResampledBarFeed object from inherited base classes: barfeed with example: obj = ResampledBarFeed(barFeed, frequency, maxLen)