Move an entry to another group.
        
        :param entry: The Entry object to move.
        :type entry: :class:`keepassdb.model.Entry`
        
        :param group: The new parent Group object for the entry.
        :type group: :class:`keepassdb.model.Group`
        
        :param index: The 0-based index within the parent (defaults to appending
                      group to end of parent's children).
        :type index: int

def move_entry(self, entry, group, index=None):
        """
        Move an entry to another group.
        
        :param entry: The Entry object to move.
        :type entry: :class:`keepassdb.model.Entry`
        
        :param group: The new parent Group object for the entry.
        :type group: :class:`keepassdb.model.Group`
        
        :param index: The 0-based index within the parent (defaults to appending
                      group to end of parent's children).
        :type index: int
        """
        if not isinstance(entry, Entry):
            raise TypeError("entry param must be of type Entry")
        if not isinstance(group, Group):
            raise TypeError("group param must be of type Group")
        
        if entry not in self.entries:
            raise exc.UnboundModelError("Invalid entry (or not bound to this database): {0!r}".format(entry))
        if group not in self.groups:
            raise exc.UnboundModelError("Invalid group (or not bound to this database): {0!r}".format(group))
        
        curr_group = entry.group
        
        curr_group.entries.remove(entry)
        if index is None:
            group.entries.append(entry)
            self.log.debug("Moving {0!r} to child of {1!r}, (appending)".format(entry, group))
        else:
            group.entries.insert(index, entry)
            self.log.debug("Moving {0!r} to child of {1!r}, (at position {2})".format(entry, group, index))
            
        entry.group = group
        
        entry.modified = util.now()
        
        self._rebuild_entries()