def add_filter(self, name, query, color=None, item_order=None):
        """Create a new filter.

        .. warning:: Requires Todoist premium.

        :param name: The name of the filter.
        :param query: The query to search for.
        :param color: The color of the filter.
        :param item_order: The filter's order in the filter list.
        :return: The newly created filter.
        :rtype: :class:`pytodoist.todoist.Filter`

        >>> from pytodoist import todoist
        >>> user = todoist.login('john.doe@gmail.com', 'password')
        >>> overdue_filter = user.add_filter('Overdue', todoist.Query.OVERDUE)
        """
        args = {
            'name': name,
            'query': query,
            'color': color,
            'item_order': item_order
        }
        _perform_command(self, 'filter_add', args)
        return self.get_filter(name)
Create a new filter.

        .. warning:: Requires Todoist premium.

        :param name: The name of the filter.
        :param query: The query to search for.
        :param color: The color of the filter.
        :param item_order: The filter's order in the filter list.
        :return: The newly created filter.
        :rtype: :class:`pytodoist.todoist.Filter`

        >>> from pytodoist import todoist
        >>> user = todoist.login('john.doe@gmail.com', 'password')
        >>> overdue_filter = user.add_filter('Overdue', todoist.Query.OVERDUE)