def assign_properties(obj, props, prefix=[]):
    """Assigns the custom properties to obj based on the props"""

    for prop, value in props.items():

        if prop in ["geometry", "children", "parents"]:
            continue

        if isinstance(value, dict):
            obj = assign_properties(obj, value, prefix + [prop])

        else:
            obj[".".join(prefix + [prop])] = value

    return obj