'Normalize input cell data.  Normalizations include:
* Converting cell[\'type\'] to is_parent boolean.
* Merging existing transport URL with transport information.'

def _normalize_cell(self, cell, existing=None):

    if ('name' in cell):
        cell['name'] = common.normalize_name(cell['name'])
    if ('type' in cell):
        cell['is_parent'] = (cell.pop('type') == 'parent')
    elif existing:
        cell['is_parent'] = existing['is_parent']
    else:
        cell['is_parent'] = False
    transport_url = (existing.get('transport_url') if existing else None)
    transport_url = rpc.get_transport_url(transport_url)
    if ('rpc_virtual_host' in cell):
        transport_url.virtual_host = cell.pop('rpc_virtual_host')
    if (not transport_url.hosts):
        transport_url.hosts.append(messaging.TransportHost())
    transport_host = transport_url.hosts[0]
    if ('rpc_port' in cell):
        cell['rpc_port'] = int(cell['rpc_port'])
    transport_field_map = {'username': 'username', 'password': 'password', 'hostname': 'rpc_host', 'port': 'rpc_port'}
    for (key, input_field) in transport_field_map.items():
        if (input_field in cell):
            setattr(transport_host, key, cell.pop(input_field))
    cell['transport_url'] = str(transport_url)
