def METHOD_NAME(g: BaseGraph, n: str, data: dict, preserve: bool = True) -> dict:
    """
    Merge node ``n`` into graph ``g``.
    Parameters
    ----------
    g: kgx.graph.base_graph.BaseGraph
        The target graph
    n: str
        Node id
    data: dict
        Node properties
    preserve: bool
        Whether or not to preserve conflicting properties
    Returns
    -------
    dict
        The merged node
    """
    existing_node = g.nodes()[n]
    new_data = prepare_data_dict(
        copy.deepcopy(existing_node), copy.deepcopy(data), preserve
    )
    g.add_node(n, **new_data)
    return existing_node