def fix_transformation_balance(eb):
    """
    This is a fix after a manual analysis of the energy balances.

    Use with care and check the results.,
    """
    eb.loc['BB', 'input', 'Heizwerke']['total'] = eb.loc['BB', 'output',
        'Heizwerke']['total'] * 0.9
    total = eb.loc['BB', 'input', 'Heizwerke']['total']
    eb.loc['BB', 'input', 'Heizwerke']['gas'] = total - eb.loc['BB',
        'input', 'Heizwerke'].sum() + total
    kwk_row = 'Heizkraftwerke der allgemeinen Versorgung (nur KWK)'
    total = eb.loc['BY', 'input', kwk_row]['total']
    eb.loc['BY', 'input', kwk_row]['hard coal'] = total - eb.loc['BY',
        'input', kwk_row].sum() + total
    total = eb.loc['BY', 'input', 'Heizwerke']['total']
    eb.loc['BY', 'input', 'Heizwerke']['gas'] = total - eb.loc['BY',
        'input', 'Heizwerke'].sum() + total
    return eb
