<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_course_id(self, course_uuid):
 """Get course id based on uuid. Args: uuid (str):
 course uuid, i.e. /project/mitxdemosite Raises: PyLmodUnexpectedData: No course data was returned. requests.RequestException: Exception connection error Returns: int: numeric course id """

        course_data = self.get(
            'courseguide/course?uuid={uuid}'.format(
                uuid=course_uuid or self.course_id
            ),
            params=None
        )
        try:
            return course_data['response']['docs'][0]['id']
        except KeyError:
            failure_message = ('KeyError in get_course_id - '
                               'got {0}'.format(course_data))
            log.exception(failure_message)
            raise PyLmodUnexpectedData(failure_message)
        except TypeError:
            failure_message = ('TypeError in get_course_id - '
                               'got {0}'.format(course_data))
            log.exception(failure_message)
            raise PyLmodUnexpectedData(failure_message)