def METHOD_NAME(db: 'DBHandler', data: list[ManuallyTrackedBalance]) -> None:  # noqa: E501
    """Edits manually tracked balances
    May raise:
    - InputError if the given balances list is empty or if
    any of the balance entry labels to edit do not exist in the DB.
    - TagConstraintError if any of the given balance data contain unknown tags.
    """
    if len(data) == 0:
        raise InputError('Empty list of manually tracked balances to edit was given')
    with db.user_write() as cursor:
        db.ensure_tags_exist(
            cursor=cursor,
            given_data=data,
            action='editing',
            data_type='manually tracked balances',
        )
        db.METHOD_NAME(cursor, data)