.. _`Partition List Predicate`: .. _`org.sysess.sympathy.list.partitionlistpredicate`: Partition List Predicate ~~~~~~~~~~~~~~~~~~~~~~~~ .. image:: partition_list.svg :width: 48 Partition nodes with predicate takes a configurable predicate function (a function that returns True or False) from the configuration and uses it to decide how to partition the output. The function is applied for each input element in the list. If it returns True, then the element is written to the first output, otherwise it is written to the second output. Examples with port type == [table] and item type == table: Remove tables with less than 10 rows:: lambda item: item.number_of_rows() > 10 Remove empty tables:: lambda item: not item.is_empty() The name of the argument is not important. See https://docs.python.org/3/tutorial/controlflow.html#lambda-expressions for a description of lambda functions. Have a look at the :ref:`Data type APIs` to see what methods and attributes are available on the data type that you are working with. Partition a list using a predicate. *Ports*: **Inputs**: :list: [] List **Outputs**: :list_true: [] List of items where predicate returned true :list_false: [] List of items where predicate returned false *Configuration*: **predicate** Partition function .. automodule:: node_filter_list .. class:: PartitionListPredicate