'Create a new library. Arguments are similar to create_course().'

def create_library(self, org, library, user_id, fields, **kwargs):

    kwargs['fields'] = fields
    kwargs['master_branch'] = kwargs.get('master_branch', ModuleStoreEnum.BranchName.library)
    kwargs['root_category'] = kwargs.get('root_category', 'library')
    kwargs['root_block_id'] = kwargs.get('root_block_id', 'library')
    locator = LibraryLocator(org=org, library=library, branch=kwargs['master_branch'])
    return self._create_courselike(locator, user_id, **kwargs)
