Convert a match object into a dict.

    Values are:
        indent: amount of indentation of this [sub]account
        parent: the parent dict (None)
        account_fragment: account name fragment
        balance: decimal.Decimal balance
        children: sub-accounts ([])

def match_to_dict(match):
    """Convert a match object into a dict.

    Values are:
        indent: amount of indentation of this [sub]account
        parent: the parent dict (None)
        account_fragment: account name fragment
        balance: decimal.Decimal balance
        children: sub-accounts ([])
    """
    balance, indent, account_fragment = match.group(1, 2, 3)
    return {
        'balance': decimal.Decimal(balance),
        'indent': len(indent),
        'account_fragment': account_fragment,
        'parent': None,
        'children': [],
    }