code: def test_plot_bollinger_band():
      labels_orig = ["Bollinger Band", "Stock", "15d"]
      xlabel_orig = "Days"
      ylabel_orig = "Price"
      title_orig = (
          "Bollinger Band of +/- 2$\\sigma$, Moving Average "
          "of sma over 15 days"
      )
      x = np.sin(np.linspace(1, 10, 100))
      df = pd.DataFrame(
          {"Stock": x}, index=np.linspace(1, 10, 100)
      ).astype(np.float64)
      df.index.name = "Days"
      plt.figure()
      plot_bollinger_band(df, sma, span=15)
      # get data from axis object
      ax = plt.gca()
      # ax.lines[0] is the data we passed to plot_bollinger_band
      # ax.lines[1] is the moving average (already tested)
      # not sure how to obtain the data of the BollingerBand from
      # the plot.
      # only checking if input data matches data of first line on plot,
      # as a measure of data appearing in the plot
      line1 = ax.lines[0]
      stock_plot = line1.get_xydata()
      labels_plot = ax.get_legend_handles_labels()[1]
      xlabel_plot = ax.get_xlabel()
      ylabel_plot = ax.get_ylabel()
      title_plot = ax.get_title()
      # tests
      assert (df["Stock"].index.values == stock_plot[:, 0]).all()
      assert (df["Stock"].values == stock_plot[:, 1]).all()
      assert labels_orig == labels_plot
      assert xlabel_orig == xlabel_plot
      assert ylabel_orig == ylabel_plot
      assert title_orig == title_plot
  
file_path: FinQuant/tests/test_moving_average.py
imports: import matplotlib.pyplot
  import numpy
  import pandas
  from finquant.moving_average import compute_ma, ema, ema_std, plot_bollinger_band, sma, sma_std
label_desc: Use image node_id 6 for calling a global function with example usage: test_plot_bollinger_band() without return types