def METHOD_NAME(
    src,
    present=True,
    baseurl=None,
    description=None,
    enabled=True,
    gpgcheck=True,
    gpgkey=None,
):
    # NOTE: if updating this docstring also update `yum.repo`
    """
    Add/remove/update dnf repositories.
    + name: URL or name for the ``.repo``   file
    + present: whether the ``.repo`` file should be present
    + baseurl: the baseurl of the repo (if ``name`` is not a URL)
    + description: optional verbose description
    + enabled: whether this repo is enabled
    + gpgcheck: whether set ``gpgcheck=1``
    + gpgkey: the URL to the gpg key for this repo
    ``Baseurl``/``description``/``gpgcheck``/``gpgkey``:
        These are only valid when ``name`` is a filename (ie not a URL). This is
        for manual construction of repository files. Use a URL to download and
        install remote repository files.
    **Examples:**
    .. code:: python
        # Download a repository file
        dnf.rpm(
            name="Install Docker-CE repo via URL",
            src="https://download.docker.com/linux/centos/docker-ce.repo",
        )
        # Create the repository file from baseurl/etc
        dnf.repo(
            name="Add the Docker CentOS repo",
            src="DockerCE",
            baseurl="https://download.docker.com/linux/centos/7/$basearch/stable",
        )
    """
    yield from ensure_yum_repo(
        state,
        host,
        files,
        src,
        baseurl,
        present,
        description,
        enabled,
        gpgcheck,
        gpgkey,
    )