from typing import OrderedDict


def pool_list_table_format(result):
    """Format pool list as a table."""
    table_output = []
    for item in result:
        table_row = OrderedDict()
        table_row['Pool Id'] = item['id']
        table_row['State'] = item['state']
        table_row['Allocation State'] = item['allocationState']
        table_row['VM Size'] = item['vmSize']
        table_row['VM Count'] = item['currentDedicated']
        table_row['Type'] = 'IaaS' if item['virtualMachineConfiguration'] else 'PaaS'
        table_output.append(table_row)
    return table_output