<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def accept_moderator_invite(self, subreddit):
 """Accept a moderator invite to the given subreddit. Callable upon an instance of Subreddit with no arguments. :returns: The json response from the server. """

        data = {'r': six.text_type(subreddit)}
        # Clear moderated subreddits and cache
        self.user._mod_subs = None  # pylint: disable=W0212
        self.evict(self.config['my_mod_subreddits'])
        return self.request_json(self.config['accept_mod_invite'], data=data)