def _get_partners(frag_index, part_nodes):
 return [part_nodes[((frag_index - 1) % len(part_nodes))], part_nodes[((frag_index + 1) % len(part_nodes))]]

def _get_partners ( frag_index , part_nodes ) : return [ part_nodes [ ( ( frag_index - 1 ) % len ( part_nodes ) ) ] , part_nodes [ ( ( frag_index + 1 ) % len ( part_nodes ) ) ] ]
returns the left and right partners of the node whose index is equal to the given frag_index .