'Returns the given location\'s parent location in this course.
Args:
revision:
None - uses the branch setting for the revision
ModuleStoreEnum.RevisionOption.published_only
- return only the PUBLISHED parent if it exists, else returns None
ModuleStoreEnum.RevisionOption.draft_preferred
- return either the DRAFT or PUBLISHED parent, preferring DRAFT, if parent(s) exists,
else returns None'

def get_parent_location(self, location, revision=None, **kwargs):

    if (revision == ModuleStoreEnum.RevisionOption.draft_preferred):
        revision = ModuleStoreEnum.RevisionOption.draft_only
    location = self._map_revision_to_branch(location, revision=revision)
    return super(DraftVersioningModuleStore, self).get_parent_location(location, **kwargs)
