'This function will append a Info instance to an existing InfoSet which
is stored in (location_a, location_b) and matches the filter_func.
If filter_func doesn\'t match any existing InfoSet instances, then a new
one is created using `group_klass` and `info_inst` is appended to it.
:see: https://github.com/andresriancho/w3af/issues/3955
:param location_a: The "a" address
:param location_b: The "b" address
:param info_inst: The Info instance we want to store
:param group_klass: If required, will be used to create a new InfoSet
:return: (The updated/created InfoSet, as stored in the kb,
True if a new InfoSet was created)'

def append_uniq_group(self, location_a, location_b, info_inst, group_klass=InfoSet):

    if (not isinstance(info_inst, Info)):
        raise TypeError('append_uniq_group    requires    an    Info    instance    as    parameter.')
    if (not issubclass(group_klass, InfoSet)):
        raise TypeError('append_uniq_group    requires    an    InfoSet    subclass    as    parameter.')
    with self._kb_lock:
        for info_set in self.get(location_a, location_b):
            if (not isinstance(info_set, InfoSet)):
                continue
            if info_set.match(info_inst):
                old_info_set = copy.deepcopy(info_set)
                info_set.add(info_inst)
                self.update(old_info_set, info_set)
                return (info_set, False)
        else:
            info_set = group_klass([info_inst])
            self.append(location_a, location_b, info_set)
            return (info_set, True)
