opto.trace.broadcast.recursive_conversion

opto.trace.broadcast.recursive_conversion#

recursive_conversion(true_func, false_func)[source]#

Recursively apply true_func to the nodes and false_func to the rest of the objects in a container of nodes. Container of nodes are tuple, list, dict, set, and NodeContainer.

Parameters:
  • true_func (callable) – the function to be applied to the nodes.

  • false_func (callable) – the function to be applied to the rest of the objects.