def get_broker_items(broker_row_data, bip_codes):
    """Returns lists with data for broker items: execution groups, applications, message flows."""
    output_list = broker_row_data.split('\n')
    exec_groups = list()
    applications = list()
    message_flows = list()
    for record in output_list:
        if record:
            bip_code = record.split()[0].replace(':', '')
            if bip_code in bip_codes.keys():
                if  bip_codes[bip_code][0] == 'exec_groups':
                    exec_groups.append(record)
                if  bip_codes[bip_code][0] == 'applications':
                    applications.append(record)
                if  bip_codes[bip_code][0] == 'message_flows':
                    message_flows.append(record)
    return exec_groups, applications, message_flows