code: def plot_tree_custom(
      model,
      figsize=(16, 10),
      fontsize=10,
      filled=True,
      proportion=True,
      return_figure=False,
      **kwargs,
  ):
      # wrapper for the plot_tree function, that makes the plot look useful
      # it does not return the plot (because plot_tree works so)
      import matplotlib.pyplot as plt
      from sklearn.tree import plot_tree
  
      fig, ax = plt.subplots(figsize=figsize)
  
      # return_figure=True makes two plots in IPython
      if return_figure:
          return plot_tree(
              model,
              filled=filled,
              fontsize=fontsize,
              ax=ax,
              feature_names=model.feature_names,
              class_names=model.class_names,
              proportion=proportion,
              **kwargs,
          )
      else:
          _ = plot_tree(
              model,
              filled=filled,
              fontsize=fontsize,
              ax=ax,
              feature_names=model.feature_names,
              class_names=model.class_names,
              proportion=proportion,
              **kwargs,
          )
  
file_path: DALEX/python/dalex/dalex/_explainer/utils.py
imports: import numpy
  import pandas
  import types, inspect, warnings
label_desc: Use image node_id 5 for calling a global function with example usage: plot_tree_custom(model, figsize, fontsize, filled, proportion, return_figure) and returns: plot_tree