def episode(self, title=None, season=None, episode=None):
if title:<EOL><INDENT>key = '<STR_LIT>' % self.ratingKey<EOL>return self.fetchItem(key, title__iexact=title)<EOL><DEDENT>elif season is not None and episode:<EOL><INDENT>results = [i for i in self.episodes() if i.seasonNumber == season and i.index == episode]<EOL>if results:<EOL><INDENT>return results[<NUM_LIT:0>]<EOL><DEDENT>raise NotFound('<STR_LIT>' % (self.title, season, episode))<EOL><DEDENT>raise BadRequest('<STR_LIT>')<EOL>
Find a episode using a title or season and episode.

           Parameters:
                title (str): Title of the episode to return
                season (int): Season number (default:None; required if title not specified).
                episode (int): Episode number (default:None; required if title not specified).

           Raises:
                :class:`plexapi.exceptions.BadRequest`: If season and episode is missing.
                :class:`plexapi.exceptions.NotFound`: If the episode is missing.