def update_refs_recursively(properties):
    ' Replaces service names with the service selflinks recursively. '
    for prop in properties:
        value = properties[prop]
        if ((prop == 'defaultService') or (prop == 'service')):
            is_regular_name = ((not ('.' in value)) and (not ('/' in value)))
            if is_regular_name:
                properties[prop] = get_ref(value)
        elif isinstance(value, dict):
            update_refs_recursively(value)
        elif isinstance(value, list):
            for item in value:
                if isinstance(item, dict):
                    update_refs_recursively(item)
Replaces service names with the service selflinks recursively.
def update_refs_recursively(properties):
    '  '
    for prop in properties:
        value = properties[prop]
        if ((prop == 'defaultService') or (prop == 'service')):
            is_regular_name = ((not ('.' in value)) and (not ('/' in value)))
            if is_regular_name:
                properties[prop] = get_ref(value)
        elif isinstance(value, dict):
            update_refs_recursively(value)
        elif isinstance(value, list):
            for item in value:
                if isinstance(item, dict):
                    update_refs_recursively(item)