def METHOD_NAME(self, project, tags):
    config = f"""
        projects_and_groups:
          {project.path_with_namespace}:
            tags:
              tag1:
                protected: true
                create_access_level: maintainer
        """
    run_gitlabform(config, project)
    project_tags = project.tags.list()
    for tag in project_tags:
        if tag.name == "tag1":
            assert tag.protected
        else:
            assert not tag.protected
    protected_tags = project.protectedtags.list()
    assert len(protected_tags) == 1
    assert protected_tags[0].name == "tag1"
    assert (
        protected_tags[0].create_access_levels[0]["access_level"]
        == AccessLevel.MAINTAINER.value
    )