docs: def gen_dist_diff(
          networkA,
          networkB,
          techs=None,
          snapshot=0,
          n_cols=3,
          gen_size=0.2,
          filename=None,
          buscmap=plt.cm.jet):
      """
      Difference in generation distribution
      Green/Yellow/Red colors mean that the generation at a location
      is bigger with switches than without
      Blue colors mean that the generation at a location is smaller with switches
      than without
      
      Parameters
      ----------
      networkA : PyPSA network container
          Holds topology of grid with switches
          including results from powerflow analysis
      networkB : PyPSA network container
          Holds topology of grid without switches
          including results from powerflow analysis
      techs : dict
          type of technologies which shall be plotted
      snapshot : int
          snapshot
      n_cols : int
          number of columns of the plot
      gen_size : num
          size of generation bubbles at the buses
      filename : str
          Specify filename
          If not given, figure will be show directly
      """
      if techs is None:
          techs = networkA.generators.carrier.unique()
      else:
          techs = techs
  
      n_graphs = len(techs)
      n_cols = n_cols
  
      if n_graphs % n_cols == 0:
          n_rows = n_graphs // n_cols
      else:
          n_rows = n_graphs // n_cols + 1
  
      fig, axes = plt.subplots(nrows=n_rows, ncols=n_cols)
  
      size = 4
  
      fig.set_size_inches(size * n_cols, size * n_rows)
  
      for i, tech in enumerate(techs):
          i_row = i // n_cols
          i_col = i % n_cols
  
          ax = axes[i_row, i_col]
  
          gensA = networkA.generators[networkA.generators.carrier == tech]
          gensB = networkB.generators[networkB.generators.carrier == tech]
  
          gen_distribution =\
              networkA.generators_t.p.mul(networkA.snapshot_weightings, axis=0)\
              [gensA.index].loc[networkA.snapshots[snapshot]].groupby(
              networkA.generators.bus).sum().reindex(
              networkA.buses.index, fill_value=0.) -\
              networkB.generators_t.p.mul(networkB.snapshot_weightings, axis=0)\
              [gensB.index].loc[networkB.snapshots[snapshot]].groupby(
              networkB.generators.bus).sum().reindex(
              networkB.buses.index, fill_value=0.)
  
          networkA.plot(
              ax=ax,
              bus_sizes=gen_size * abs(gen_distribution),
              bus_colors=gen_distribution,
              line_widths=0.1,
              bus_cmap=buscmap)
  
          ax.set_title(tech)
  
      if filename is None:
          plt.show()
      else:
          plt.savefig(filename)
          plt.close()