'Constructs a new tko kernel object from a pb kernel object.
Uses all the getter methods on the pb kernel object to extract
the attributes and constructs a new tko kernel object using
the model.kernel constructor.
:param
kernel: a pb kernel object where data will be extracted.
:return: a new tko kernel object.'

def get_tko_kernel(self, kernel):

    fields_dict = self.get_trivial_attr(kernel, self.kernel_type_dict)
    return models.kernel(fields_dict['base'], [], fields_dict['kernel_hash'])
