'Load a course into this module store
course_path: Course directory name
returns a CourseDescriptor for the course'

def load_course(self, course_dir, course_ids, tracker, target_course_id=None):

    log.debug('========>    Starting    courselike    import    from    %s', course_dir)
    with open(((self.data_dir / course_dir) / self.parent_xml)) as course_file:
        course_file = StringIO(clean_out_mako_templating(course_file.read()))
        course_data = etree.parse(course_file, parser=edx_xml_parser).getroot()
        org = course_data.get('org')
        if (org is None):
            msg = "No    'org'    attribute    set    for    courselike    in    {dir}.    Using    default    'edx'".format(dir=course_dir)
            log.warning(msg)
            tracker(msg)
            org = 'edx'
        courselike_label = self.parent_xml.split('.')[0]
        course = course_data.get(courselike_label)
        if (course is None):
            msg = "No    '{courselike_label}'    attribute    set    for    course    in    {dir}.    Using    default    '{default}'".format(courselike_label=courselike_label, dir=course_dir, default=course_dir)
            log.warning(msg)
            tracker(msg)
            course = course_dir
        url_name = course_data.get('url_name', course_data.get('slug'))
        if url_name:
            policy_dir = (((self.data_dir / course_dir) / 'policies') / url_name)
            policy_path = (policy_dir / 'policy.json')
            policy = self.load_policy(policy_path, tracker)
            if (policy == {}):
                dog_stats_api.increment(DEPRECATION_VSCOMPAT_EVENT, tags=('location:xml_load_course_policy_dir', u'course:{}'.format(course)))
                old_policy_path = (((self.data_dir / course_dir) / 'policies') / '{0}.json'.format(url_name))
                policy = self.load_policy(old_policy_path, tracker)
        else:
            policy = {}
            if course_data.get('name'):
                dog_stats_api.increment(DEPRECATION_VSCOMPAT_EVENT, tags=('location:xml_load_course_course_data_name', u'course:{}'.format(course_data.get('course')), u'org:{}'.format(course_data.get('org')), u'name:{}'.format(course_data.get('name'))))
                url_name = Location.clean(course_data.get('name'))
                tracker("'name'    is    deprecated    for    module    xml.        Please    use    display_name    and    url_name.")
            else:
                url_name = None
        course_id = self.get_id(org, course, url_name)
        if ((course_ids is not None) and (course_id not in course_ids)):
            return None
        def get_policy(usage_id):
            '\n                                                                Return    the    policy    dictionary    to    be    applied    to    the    specified    XBlock    usage\n                                                                '
            return policy.get(policy_key(usage_id), {})
        services = {}
        if self.i18n_service:
            services['i18n'] = self.i18n_service
        if self.fs_service:
            services['fs'] = self.fs_service
        if self.user_service:
            services['user'] = self.user_service
        system = ImportSystem(xmlstore=self, course_id=course_id, course_dir=course_dir, error_tracker=tracker, load_error_modules=self.load_error_modules, get_policy=get_policy, mixins=self.xblock_mixins, default_class=self.default_class, select=self.xblock_select, field_data=self.field_data, services=services, target_course_id=target_course_id)
        course_descriptor = system.process_xml(etree.tostring(course_data, encoding='unicode'))
        if isinstance(course_descriptor, ErrorDescriptor):
            return course_descriptor
        self.content_importers(system, course_descriptor, course_dir, url_name)
        log.debug('========>    Done    with    courselike    import    from    %s', course_dir)
        return course_descriptor
