<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_cognitive_process(self):
 """Gets the grade associated with the cognitive process. return: (osid.grading.Grade) - the grade raise: IllegalState - has_cognitive_process() is false raise: OperationFailed - unable to complete request compliance: mandatory - This method must be implemented. """

        if not self.has_cognitive_process():
            raise IllegalState()
        else:
            return Grade(self._get_grade_map(self._my_map['cognitiveProcessId'])),