def create_attrs_dict(node_tree, node):
    """
    Create a dict to be passed into the attrs=... kwarg of NodeWrangler.new_node

    IE, the dict should represent all the properties of `node` that need to be set
    but are NOT part of node.inputs - things like setting what operation a math node
    does, or how a mix node should mix its inputs.
    """

    attr_names = node_attrs_available(node)

    for a in COMMON_ATTR_NAMES:
        if hasattr(node, a) and a not in attr_names:
            raise ValueError(
                f"{node.bl_idname=} has attr {repr(a)} but it is not listed in node_info.NODE_ATTRS_AVAILABLE, please add it to avoid incorrect behavior"
            )

    # Check that the dict is correct / doesnt contain typos
    for a in attr_names:
        if not hasattr(node, a):
            nodetype_expr = get_nodetype_expression(node)
            raise ValueError(
                f"attrs_available[{nodetype_expr} is incorrect, real node {node} did not have an attribute '{a}' - please contact the developer"
            )

    # Filter out the attrs which havent been changed from their default values -
    #    clearly we dont need to set these ones manually, so we can save code verbosity
    attr_names = [
        a for a in attr_names if has_default_value_changed(node_tree, node, a)
    ]

    return {
        repr(k): represent_default_value(getattr(node, k), simple=True)
        for k in attr_names
    }

    Create a dict to be passed into the attrs=... kwarg of NodeWrangler.new_node

    IE, the dict should represent all the properties of `node` that need to be set
    but are NOT part of node.inputs - things like setting what operation a math node
    does, or how a mix node should mix its inputs.
    
infinigen/core/nodes/node_transpiler/transpiler.py