code: def bar_plot_summary(
      synthetic_summary,
      k,
      drop_learners=[],
      drop_cols=[],
      sort_cols=["MSE", "Abs % Error of ATE"],
  ):
      """Generates a bar plot comparing learner performance.
  
      Args:
          synthetic_summary (pd.DataFrame): summary generated by get_synthetic_summary()
          k (int): number of simulations (used only for plot title text)
          drop_learners (list, optional): list of learners (str) to omit when plotting
          drop_cols (list, optional): list of metrics (str) to omit when plotting
          sort_cols (list, optional): list of metrics (str) to sort on when plotting
      """
      plot_data = synthetic_summary.sort_values(
          sort_cols, ascending=True
      )
      plot_data = plot_data.drop(drop_learners + [KEY_ACTUAL]).drop(
          drop_cols, axis=1
      )
  
      plot_data.plot(kind="bar", figsize=(12, 8))
      plt.xticks(rotation=30)
      plt.title(
          "Learner Performance (averaged over k={} simulations)".format(
              k
          )
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from matplotlib import pyplot
  import numpy
  import pandas
  from sklearn.metrics import mean_squared_error
  from sklearn.metrics import auc
  from sklearn.model_selection import train_test_split
  from sklearn.linear_model import LinearRegression
  from xgboost import XGBRegressor
  from scipy.stats import entropy
  import warnings
  from causalml.inference.meta import BaseXRegressor, BaseRRegressor, BaseSRegressor, BaseTRegressor
  from causalml.inference.tree.causal.causaltree import CausalTreeRegressor
  from causalml.propensity import ElasticNetPropensityModel
  from causalml.metrics import plot_gain, get_cumgain
label_desc: Use image node_id 4 for calling a global function with example usage: bar_plot_summary(synthetic_summary, k, drop_learners, drop_cols, sort_cols) without return types