code: def next(self):
      # A bearish turning point occurs when there is a pattern with the
      # highest high in the middle and two lower highs on each side. [Ref 1]
  
      last_five_highs = self.data.high.get(size=self.p.period)
      max_val = max(last_five_highs)
      max_idx = last_five_highs.index(max_val)
  
      if max_idx == self.p.shift_to_potential_fractal:
          self.lines.fractal_bearish[-2] = max_val * (
              1 + self.p.bardist
          )
  
      # A bullish turning point occurs when there is a pattern with the
      # lowest low in the middle and two higher lowers on each side. [Ref 1]
      last_five_lows = self.data.low.get(size=self.p.period)
      min_val = min(last_five_lows)
      min_idx = last_five_lows.index(min_val)
  
      if min_idx == self.p.shift_to_potential_fractal:
          self.l.fractal_bullish[-2] = min_val * (1 - self.p.bardist)
  
imports: import backtrader
label_desc: Use image node_id 1 for calling the Fractal obj's underlying member method code with example usage: obj.next() without return types