def media_play_pause(self):
    'Simulate play pause media player.'
    if self._playing:
        self.media_pause()
    else:
        self.media_play()
Simulate play pause media player.
def media_play_pause(self):
    
    if self._playing:
        self.media_pause()
    else:
        self.media_play()