code: def getNextBars(self):
      # All bars must have the same datetime. We will return all the ones with the smallest datetime.
      smallestDateTime = self.peekDateTime()
  
      if smallestDateTime is None:
          return None
  
      # Make a second pass to get all the bars that had the smallest datetime.
      ret = {}
      for instrument, bars in six.iteritems(self.__bars):
          nextPos = self.__nextPos[instrument]
          if (
              nextPos < len(bars)
              and bars[nextPos].getDateTime() == smallestDateTime
          ):
              ret[instrument] = bars[nextPos]
              self.__nextPos[instrument] += 1
  
      if self.__currDateTime == smallestDateTime:
          raise Exception(
              "Duplicate bars found for %s on %s"
              % (list(ret.keys()), smallestDateTime)
          )
  
      self.__currDateTime = smallestDateTime
      return bar.Bars(ret)
  
file_path: pyalgotrade/pyalgotrade/barfeed/membf.py
imports: import six
  from pyalgotrade import barfeed
  from pyalgotrade import bar
  from pyalgotrade import utils
label_desc: Use image node_id 10 for calling the BarFeed obj's underlying member method code with example usage: obj.getNextBars() and returns: bar, None