code: def _calcbuffer(self):
      # Period calculation
      minend = self.p.end.hour * 60 + self.p.end.minute
      # minstart = session_start.hour * 60 + session_start.minute
      # use prestart to account for market_data
      minstart = self.p.prestart.hour * 60 + self.p.prestart.minute
  
      minbuffer = minend - minstart
  
      tframe = self.data._timeframe
      tcomp = self.data._compression
  
      if tframe == bt.TimeFrame.Seconds:
          minbuffer = minperiod * 60
  
      minbuffer = (minbuffer // tcomp) + tcomp
  
      return minbuffer
  
file_path: backtrader/samples/relative-volume/relvolbybar.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import collections
  import datetime
  import math
  import backtrader
label_desc: Use image node_id 7 for calling the RelativeVolumeByBar obj's underlying member method code with example usage: obj._calcbuffer() and returns: minbuffer