code: def plot(
      df, kind="gain", tmle=False, n=100, figsize=(8, 8), *args, **kwarg
  ):
      """Plot one of the lift/gain/Qini charts of model estimates.
  
      A factory method for `plot_lift()`, `plot_gain()`, `plot_qini()`, `plot_tmlegain()` and `plot_tmleqini()`.
      For details, pleas see docstrings of each function.
  
      Args:
          df (pandas.DataFrame): a data frame with model estimates and actual data as columns.
          kind (str, optional): the kind of plot to draw. 'lift', 'gain', and 'qini' are supported.
          n (int, optional): the number of samples to be used for plotting.
      """
      catalog = {
          "lift": get_cumlift,
          "gain": get_cumgain,
          "qini": get_qini,
      }
  
      assert (
          kind in catalog.keys()
      ), "{} plot is not implemented. Select one of {}".format(
          kind, catalog.keys()
      )
  
      if tmle:
          ci_catalog = {"gain": plot_tmlegain, "qini": plot_tmleqini}
          assert (
              kind in ci_catalog.keys()
          ), "{} plot is not implemented. Select one of {}".format(
              kind, ci_catalog.keys()
          )
  
          ci_catalog[kind](df, *args, **kwarg)
      else:
          df = catalog[kind](df, *args, **kwarg)
  
          if (n is not None) and (n < df.shape[0]):
              df = df.iloc[
                  np.linspace(0, df.index[-1], n, endpoint=True)
              ]
  
          df.plot(figsize=figsize)
          plt.xlabel("Population")
          plt.ylabel("{}".format(kind.title()))
  
imports: from matplotlib import pyplot
  import logging
  import numpy
  import pandas
  import seaborn
  from lightgbm import LGBMRegressor
  from ..inference.meta.tmle import TMLELearner
label_desc: Use image node_id 1 for calling a global function with example usage: plot(df, kind, tmle, n, figsize) without return types