def METHOD_NAME(self, nodes: list[TreeNode]) -> list[Row]:
    """Turn a portfolio of tree nodes into querytable-style data.
    Args:
        nodes: Account tree nodes.
    Return:
        types: Tuples of column names and types as strings.
        rows: Dictionaries of row data by column names.
    """
    operating_currency = self.ledger.options["operating_currency"][0]
    acct_balances: list[tuple[str, Decimal | None]] = []
    total = Decimal()
    for node in nodes:
        balance = cost_or_value(node.balance)
        if operating_currency in balance:
            balance_dec = balance[operating_currency]
            total += balance_dec
            acct_balances.append((node.name, balance_dec))
        else:
            acct_balances.append((node.name, None))
    return [
        Row(
            account,
            bal,
            (round((bal / total) * 100, 2) if bal else None),
        )
        for account, bal in acct_balances
    ]