def METHOD_NAME(self, playername, command):
    if command in mpris_commands:
        proxy = self.bus.get_object(playername,
                                    "/org/mpris/MediaPlayer2")
        player = dbus.Interface(
            proxy, dbus_interface='org.mpris.MediaPlayer2.Player')
        run_command = getattr(player, command,
                              lambda: "Unknown command")
        return run_command()
    else:
        raise RuntimeError("MPRIS command {} not supported".format(
            command))