def METHOD_NAME(pid):
    """
    Use DBUS to check if a PID belongs to a running systemd service and return the service name if it does.
    """
    bus = dbus.SystemBus()
    systemd_object = bus.get_object(
        "org.freedesktop.systemd1", "/org/freedesktop/systemd1"
    )
    systemd = dbus.Interface(systemd_object, "org.freedesktop.systemd1.Manager")
    try:
        service_path = systemd.GetUnitByPID(pid)
        service_object = bus.get_object("org.freedesktop.systemd1", service_path)
        service_props = dbus.Interface(
            service_object, "org.freedesktop.DBus.Properties"
        )
        service_name = service_props.Get("org.freedesktop.systemd1.Unit", "Id")
        name = str(service_name)
        if name and name.endswith(".service"):
            return _strip_suffix(name)
        else:
            return None
    except dbus.DBusException:
        return None