code: def configure_createcollection(self, ns, definition):
          
          paginated_list_schema = self.page_cls.make_paginated_list_schema_class(
              ns,
              definition.response_schema,
          )()
  
          @self.add_route(ns.collection_path, Operation.CreateCollection, ns)
          @request(definition.request_schema)
          @response(paginated_list_schema)
          @wraps(definition.func)
          def create_collection(**path_data):
              request_data = load_request_data(definition.request_schema)
              # NB: if we don't filter the request body through an explicit page schema,
              # we will leak other request arguments into the pagination query strings
              page = self.page_cls.from_query_string(self.page_schema(), request_data)
  
              result = definition.func(**merge_data(
                  path_data,
                  merge_data(
                      request_data,
                      page.to_dict(func=identity),
                  ),
              ))
  
              response_data, headers = page.to_paginated_list(result, ns, Operation.CreateCollection)
              definition.header_func(headers, response_data)
              response_format = self.negotiate_response_content(definition.response_formats)
              return dump_response_data(
                  paginated_list_schema,
                  response_data,
                  headers=headers,
                  response_format=response_format,
              )
  
          create_collection.__doc__ = "Create the collection of {}".format(pluralize(ns.subject_name))
docs: Register create collection endpoint.
  
          :param ns: the namespace
          :param definition: the endpoint definition