def quantity_label(quantity):
    """Returns formatted string of parameter label
    """
    labels = {
        'accrate': r'$\dot{m}$',
        'alpha': r'$\alpha$',
        'd_b': r'$d \sqrt{\xi_\mathrm{b}}$',
        'dt': r'$\Delta t$',
        'fluence': r'$E_\mathrm{b}$',
        'length': 'Burst length',
        'lum': r'$\mathit{L}$',
        'm_gr': '$M$',
        'm_nw': r'$M_\mathrm{NW}$',
        'mdot': r'$\dot{m}$',
        'peak': r'$L_\mathrm{peak}$',
        'qb': r'$Q_\mathrm{b}$',
        'rate': r'Burst rate',
        'redshift': '$z$',
        'x': r'$X_0$',
        'xedd': r'$X_\mathrm{Edd}$',
        'xedd_ratio': r'$X_\mathrm{Edd} / X_0$',
        'xi_ratio': r'$\xi_\mathrm{p} / \xi_\mathrm{b}$',
        'xi_b': r'$\xi_\mathrm{b}$',
        'xi_p': r'$\xi_\mathrm{p}$',
        'z': r'$Z_\mathrm{CNO}$',
    }
    return labels.get(quantity, f'${quantity}$')