function_to_node#

maize.utilities.macros.function_to_node(func: Callable[[...], Any]) type[Node][source]#

Dynamically creates a new node type from an existing python function.

Parameters:

func – Function to convert, args will be converted to inputs, kwargs will be converted to parameters. A single return will be converted to one output port.

Returns:

Node class

Return type:

type[Node]