code: def plot_bollinger_band(
      data: pd.DataFrame,
      fun: Callable[[pd.DataFrame, int], pd.DataFrame],
      span: int = 100,
  ) -> None:
      """Computes and visualises a Bolling Band.
  
      :param data: A dataframe of daily stock prices
      :param fun: function that computes a moving average, e.g. ``sma`` (simple) or
           ``ema`` (exponential).
      :param span: Number of days/values over which the average is computed, default: 100
      """
      # Type validations:
      type_validation(data=data, fun=fun, span=span)
      # special requirement for dataframe "data":
      if (
          isinstance(data, pd.DataFrame)
          and not len(data.columns.values) == 1
      ):
          raise ValueError("data is expected to have only one column.")
      # converting data to pd.DataFrame if it is a pd.Series (for subsequent function calls):
      if isinstance(data, pd.Series):
          data = data.to_frame()
      # compute moving average
      m_a = compute_ma(data, fun, [span], plot=False)
      # create dataframes for bollinger band object and standard
      # deviation
      bol = m_a.copy(deep=True)
      std = m_a.copy(deep=True)
      # get column label
      collabel = data.columns.values[0]
      # get standard deviation
      if fun is sma:
          std[str(span) + "d std"] = sma_std(data[collabel], span=span)
      elif fun is ema:
          std[str(span) + "d std"] = ema_std(data[collabel], span=span)
      # compute upper and lower band
      bol["Lower Band"] = bol[str(span) + "d"] - (
          std[str(span) + "d std"] * 2
      )
      bol["Upper Band"] = bol[str(span) + "d"] + (
          std[str(span) + "d std"] * 2
      )
      # plot
      fig = plt.figure()
      axis = fig.add_subplot(111)
      # bollinger band
      axis.fill_between(
          data.index.values,
          bol["Upper Band"],
          bol["Lower Band"],
          color="darkgrey",
          label="Bollinger Band",
      )
      # plot data and moving average
      bol[collabel].plot(ax=axis)
      bol[str(span) + "d"].plot(ax=axis)
      # title
      title = (
          "Bollinger Band of +/- 2$\\sigma$, Moving Average of "
          + str(fun.__name__)
          + " over "
          + str(span)
          + " days"
      )
      plt.title(title)
      # legend
      plt.legend()
      # axis labels
      plt.xlabel(data.index.name)
      plt.ylabel("Price")
  
file_path: FinQuant/finquant/moving_average.py
imports: from typing import Callable, List
  import matplotlib.pyplot
  import numpy
  import pandas
  from finquant.data_types import SERIES_OR_DATAFRAME
  from finquant.type_utilities import type_validation
label_desc: Use image node_id 6 for calling a global function with example usage: plot_bollinger_band(data, fun, span) without return types