'Helper method to add a LibraryContent block to a course.
The block will be configured to select content from the library
specified by library_key.
other_settings can be a dict of Scope.settings fields to set on the block.'

def _add_library_content_block(self, course, library_key, publish_item=False, other_settings=None):

    return ItemFactory.create(category='library_content', parent_location=course.location, user_id=self.user.id, publish_item=publish_item, source_library_id=unicode(library_key), **(other_settings or {}))
