def METHOD_NAME(src, present=True):
    # NOTE: if updating this docstring also update `yum.rpm`
    """
    Add/remove ``.rpm`` file packages.
    + src: filename or URL of the ``.rpm`` package
    + present: whether ore not the package should exist on the system
    URL sources with ``present=False``:
        If the ``.rpm`` file isn't downloaded, pyinfra can't remove any existing
        package as the file won't exist until mid-deploy.
    **Example:**
    .. code:: python
        major_centos_version = host.get_fact(LinuxDistribution)["major"]
        dnf.rpm(
           name="Install EPEL rpm to enable EPEL repo",
           src=f"https://dl.fedoraproject.org/pub/epel/epel-release-latest-{major_centos_version}.noarch.rpm",
        )
    """
    yield from ensure_rpm(state, host, files, src, present, "dnf")