code: def show_proportions(adata):
      
      layers_keys = [key for key in ['spliced', 'unspliced', 'ambiguous'] if key in adata.layers.keys()]
      tot_mol_cell_layers = [adata.layers[key].sum(1) for key in layers_keys]
  
      mean_abundances = np.round(
          [np.mean(tot_mol_cell / np.sum(tot_mol_cell_layers, 0)) for tot_mol_cell in tot_mol_cell_layers], 2)
  
      print('Abundance of ' + str(layers_keys) + ': ' + str(mean_abundances))
docs: Fraction of spliced/unspliced/ambiguous abundances
  
      Arguments
      ---------
      adata: :class:`~anndata.AnnData`
          Annotated data matrix.
  
      Returns
      -------
      Prints the fractions of abundances.