'Creates a new tko iteration with the data in the provided
pb iteration.
Uses the data in the pb iteration and the models.iteration
constructor to create a new tko iterations
:param
iteration: a pb iteration instance
:return: a tko iteration instance with the same data.'

def get_tko_iteration(self, iteration):

    fields_dict = self.get_trivial_attr(iteration, self.iteration_type_dict)
    fields_dict['attr_keyval'] = dict(((keyval.name, keyval.value) for keyval in iteration.attr_keyval))
    fields_dict['perf_keyval'] = dict(((keyval.name, keyval.value) for keyval in iteration.perf_keyval))
    return models.iteration(fields_dict['index'], fields_dict['attr_keyval'], fields_dict['perf_keyval'])
