def METHOD_NAME(distribution, has_signing_service=False):
    subprocess.run(("sudo", "dnf", "config-manager", "--add-repo", distribution.base_url))
    repo_id = "*{}_".format(distribution.base_path)
    args = ["sudo", "dnf", "config-manager", "--save", f"--setopt={repo_id}.gpgcheck=0"]
    if has_signing_service:
        public_key_url = f"{distribution.base_url}repodata/repomd.xml.key"
        args.extend(
            (
                f"--setopt={repo_id}.repo_gpgcheck=1",
                f"--setopt={repo_id}.gpgkey={public_key_url}",
            )
        )
    subprocess.run(args + [repo_id])
    added_repos.append(repo_id)