<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def move_entry_in_group(self, entry = None, index = None):
 """Move entry to another position inside a group. An entry and a valid index to insert the entry in the entry list of the holding group is needed. 0 means that the entry is moved to the first position 1 to the second and so on. """


        if entry is None or index is None or type(entry) is not v1Entry \
            or type(index) is not int:
            raise KPError("Need an entry and an index.")
        elif index < 0 or index > len(entry.group.entries)-1:
            raise KPError("Index is not valid.")
        elif entry not in self.entries:
            raise KPError("Entry not found.")
        
        pos_in_group = entry.group.entries.index(entry)
        pos_in_entries = self.entries.index(entry)
        entry_at_index = entry.group.entries[index]
        pos_in_entries2 = self.entries.index(entry_at_index)

        entry.group.entries[index] = entry
        entry.group.entries[pos_in_group] = entry_at_index
        self.entries[pos_in_entries2] = entry
        self.entries[pos_in_entries] = entry_at_index
        return True