<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def remove_entry(self, entry = None):
 """This method can remove entries. The v1Entry-object entry is needed. """

        
        if entry is None or type(entry) is not v1Entry:
            raise KPError("Need an entry.")
        elif entry in self.entries:
            entry.group.entries.remove(entry)
            self.entries.remove(entry)
            self._num_entries -= 1
            return True
        else:
            raise KPError("Given entry doesn't exist.")