'Get the course key that will be used for the target modulestore.'

def get_dest_id(self, courselike_key):

    if (self.target_id is not None):
        dest_id = self.target_id
    else:
        dest_id = self.store.make_course_key(courselike_key.org, courselike_key.course, courselike_key.run)
    existing_id = self.store.has_course(dest_id, ignore_case=True)
    if existing_id:
        dest_id = existing_id
    runtime = None
    if (self.create_if_not_present and (not existing_id)):
        try:
            new_course = self.store.create_course(dest_id.org, dest_id.course, dest_id.run, self.user_id)
            runtime = new_course.runtime
        except DuplicateCourseError:
            log.debug('Skipping    import    of    course    with    id,    %s,    since    it    collides    with    an    existing    one', dest_id)
            raise
    return (dest_id, runtime)
