human
Complete this python program:
def can_play_exploration(handler):
assistant
#Here is the Python code you requested.

    """Decorator to check whether user can play given exploration.
    """
    def test_can_play(self, exploration_id, **kwargs):
        if (exploration_id in feconf.DISABLED_EXPLORATION_IDS):
            raise self.PageNotFoundException
        exploration_rights = rights_manager.get_exploration_rights(exploration_id, strict=False)
        if rights_manager.check_can_access_activity(self.user_id, self.actions, constants.ACTIVITY_TYPE_EXPLORATION, exploration_rights):
            return handler(self, exploration_id, **kwargs)
        else:
            raise self.PageNotFoundException
    test_can_play.__wrapped__ = True
    return test_can_play