def METHOD_NAME(self, svc, factories, key, value, visible):
    values = {
        "shared": True,
        "deleted": False,
        "nipsad": False,
        "moderated": False,
        "updated": "2021-01-01",
    }
    if key:
        values[key] = value
    viewer = factories.User(authority=self.AUTHORITY)
    author = factories.User(authority=self.AUTHORITY, nipsa=values["nipsad"])
    anno = factories.Annotation(
        userid=author.userid,
        group=factories.Group(members=[author, viewer]),
        shared=values["shared"],
        deleted=values["deleted"],
        updated=values["updated"],
    )
    if values["moderated"]:
        factories.AnnotationModeration(annotation=anno)
    annotations = svc.annotation_search(
        authority=self.AUTHORITY,
        audience={"username": [viewer.username]},
        updated={"gt": "2020-01-01", "lte": "2022-01-01"},
    )
    if visible:
        assert annotations == [anno]
    else:
        assert not annotations