def METHOD_NAME(
    self,
    groupitems: BookmarkEntryList,
    name: str,
    link: str,
    move_to_top: bool = False,
    limit: int | None = None,
) -> None:
    item_found = False
    for i in groupitems:
        bookmark = i.get(name)
        if bookmark is not None:
            i[name] = link
            item_found = True
    if not item_found:
        groupitems.insert(0, {name: link})
    elif move_to_top:
        self._delete_item_from_group(groupitems, name)
        groupitems.insert(0, {name: link})
    if limit is not None:
        groupitems[:] = groupitems[:limit]