def get_func_name(target):
    """
    Decide a python function name which will produce the `target`
    """

    node_tree = get_node_tree(target)

    if hasattr(target, "bl_idname") and target.bl_idname.endswith("NodeGroup"):
        # Nodegroup wrapper nodes dont have good names, use the name of the nodegroup itself
        category = "nodegroup"
        name = snake_case(target.node_tree.name)
    else:
        category = snake_case(node_tree.bl_idname).split("_")[0]
        name = snake_case(target.name)

    # attempt to make names nicer when transpiling already transpiled code
    if name.startswith(category):
        name = name[len(category) :]
    nogc = "(no_gc)"
    if name.endswith(nogc):
        name = name[: -len(nogc)]

    finalname = f"{category}_{name}"
    finalname = finalname.replace("__", "_").strip("_")

    return finalname

    Decide a python function name which will produce the `target`
    
infinigen/core/nodes/node_transpiler/transpiler.py