code: def BBANDS(data, n_lookback, n_std):
      """Bollinger bands indicator"""
      hlc3 = (data.High + data.Low + data.Close) / 3
      mean, std = (
          hlc3.rolling(n_lookback).mean(),
          hlc3.rolling(n_lookback).std(),
      )
      upper = mean + n_std * std
      lower = mean - n_std * std
      return upper, lower
  
file_path: backtesting.py/doc/examples/Trading with Machine Learning.py
imports: from backtesting.test import EURUSD, SMA
  import numpy
  import pandas
  from sklearn.neighbors import KNeighborsClassifier
  from sklearn.model_selection import train_test_split
  from backtesting import Backtest, Strategy
label_desc: Use image node_id 1 for calling a global function with example usage: BBANDS(data, n_lookback, n_std) and returns: upper,  lower