docs: def ending(self, end, predicate=None, index=None):
          """
          Retrieves a set of Match objects that ends at given index.
          :param end: the ending index
          :type end: int
          :param predicate:
          :type predicate:
          :return: set of matches
          :rtype: set[Match]
          """
          return filter_index(_BaseMatches._base(self._end_dict[end]), predicate, index)