<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_pattern(self, pattern):
 """ Removes given pattern from the Model. :param pattern: Pattern. :type pattern: unicode :return: Method success. :rtype: bool """


        for index, node in enumerate(self.root_node.children):
            if node.name != pattern:
                continue

            LOGGER.debug("> Removing '{0}' at '{1}' index.".format(pattern, index))

            self.beginRemoveRows(self.get_node_index(self.root_node), index, index)
            pattern_node = self.root_node.child(index)
            self.root_node.remove_child(index)
            self.endRemoveRows()
            self.pattern_removed.emit(pattern_node)
            return True