def merge(hub, flows):
    """
    Given the flows, find the areas where they converge and merge the related
    ingress data
    """
    ingress = {}
    r_flows = {}
    for full, data in flows.items():
        for pipe in data:
            if not data[pipe].get('enabled', True):
                continue
            for key in data[pipe]['ingress']:
                if key not in ingress:
                    ingress[key] = {}
                if pipe not in ingress[key]:
                    ingress[key][pipe] = []
                val = data[pipe]['ingress'][key]
                if not isinstance(val, list):
                    ingress[key][pipe].append(val)
                else:
                    ingress[key][pipe].extend(val)
                r_flows[pipe] = data[pipe]
    return ingress, r_flows
