docs: def range(self, start=0, end=None, predicate=None, index=None):
          """
          Retrieves a set of Match objects that are available in given range, sorted from start to end.
          :param start: the starting index
          :type start: int
          :param end: the ending index
          :type end: int
          :param predicate:
          :type predicate:
          :param index:
          :type index: int
          :return: set of matches
          :rtype: set[Match]
          """
          if end is None:
              end = self.max_end
          else:
              end = min(self.max_end, end)
          ret = _BaseMatches._base()
          for match in sorted(self):
              if match.start < end and match.end > start:
                  ret.append(match)
          return filter_index(ret, predicate, index)