def get_num_code_units(self):
    if (self.nature == 0):
        return 1
    elif (self.nature == 1):
        op_count = 1
        size_count = 1
        first_key_count = 2
        keys_count = (self.size * 2)
        return (((op_count + size_count) + first_key_count) + keys_count)
    elif (self.nature == 2):
        op_count = 1
        size_count = 1
        keys_and_targets_count = (self.size * 4)
        return ((op_count + size_count) + keys_and_targets_count)
    elif (self.nature == 3):
        op_count = 1
        element_width_count = 2
        return ((op_count + element_width_count) + len(self.data))
    else:
        raise ValueError(('add support for NOP nature %u' % self.nature))
def get_num_code_units(self):
    if (self.nature == 0):
        return 1
    elif (self.nature == 1):
        op_count = 1
        size_count = 1
        first_key_count = 2
        keys_count = (self.size * 2)
        return (((op_count + size_count) + first_key_count) + keys_count)
    elif (self.nature == 2):
        op_count = 1
        size_count = 1
        keys_and_targets_count = (self.size * 4)
        return ((op_count + size_count) + keys_and_targets_count)
    elif (self.nature == 3):
        op_count = 1
        element_width_count = 2
        return ((op_count + element_width_count) + len(self.data))
    else:
        raise ValueError(('add support for NOP nature %u' % self.nature))