'Return an array of all of the orphans in the course.'

def get_orphans(self, course_key, **kwargs):

    if ((not isinstance(course_key, CourseLocator)) or course_key.deprecated):
        raise ItemNotFoundError(course_key)
    detached_categories = [name for (name, __) in XBlock.load_tagged_classes('detached')]
    course = self._lookup_course(course_key)
    items = set(course.structure['blocks'].keys())
    items.remove(course.structure['root'])
    blocks = course.structure['blocks']
    for (block_id, block_data) in blocks.iteritems():
        items.difference_update((BlockKey(*child) for child in block_data.fields.get('children', [])))
        if (block_data.block_type in detached_categories):
            items.discard(block_id)
    return [course_key.make_usage_key(block_type=block_id.type, block_id=block_id.id) for block_id in items]
