<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def to_identifier(self):
 """Return the season identifier which is compatible with requests that require season definitions. :return: Season identifier/definition :rtype: :class:`~python:dict` """


        return {
            'number': self.pk,
            'episodes': [
                episode.to_dict()
                for episode in self.episodes.values()
            ]
        }