'Returns the partition that this split module is currently using, or None
if the currently selected partition ID does not match any of the defined partitions.'

def get_selected_partition(self):

    for user_partition in self.user_partitions:
        if (user_partition.id == self.user_partition_id):
            return user_partition
    return None
