code: def matplotlib_multiple_axes_figures(
      total_plot_count=3, data=[1, 2, 3]
  ):
      """Helper generator which  create a figure containing up to `total_plot_count`
      axes and optionally adds `data` to each axes in a permutation-style loop.
      """
      for num_plots in range(1, total_plot_count + 1):
          for permutation in range(2**num_plots):
              has_data = [
                  permutation & (1 << i) > 0 for i in range(num_plots)
              ]
              fig, ax = plt.subplots(num_plots)
              if num_plots == 1:
                  if has_data[0]:
                      ax.plot(data)
              else:
                  for plot_id in range(num_plots):
                      if has_data[plot_id]:
                          ax[plot_id].plot(data)
              yield fig
              plt.close()
  
file_path: wandb/tests/pytest_tests/unit_tests_old/utils/dummy_data.py
imports: import matplotlib
  import matplotlib.pyplot
  import numpy
  from bokeh.plotting import figure
label_desc: Use image node_id 1 for calling a global function with example usage: matplotlib_multiple_axes_figures(total_plot_count, data) without return types