def METHOD_NAME(org, number, display_name, user):
    """
    Create or retrieve given library and return its course-like key
    """
    try:
        # Create library if it does not exist
        store = modulestore()
        with store.default_store(ModuleStoreEnum.Type.split):
            library = store.create_library(
                org=org,
                library=number,
                user_id=user.id,
                fields={
                    "display_name": display_name
                },
            )
        add_instructor(library.location.library_key, user, user)
        return library.location.library_key, True
    except DuplicateCourseError:
        # Course exists, return its key
        return LibraryLocator(org=org, library=number), False