lifecycles.LifeCycle.get_partition_at

LifeCycle.get_partition_at(tid: int) list

retrieve a partition by id

Parameters:

tid – the id of the partition to retrieve

Returns:

the partition corresponding to the given id

Example:

>>> lc = LifeCycle()
>>> lc.add_partition([[1,2], [3,4,5]])
>>> lc.add_partition([{5,7}, {6,8}, {9}])
>>> lc.get_partition_at(0)
['0_0', '0_1']
>>> lc.get_partition_at(1)
['1_0', '1_1', '1_2']