code: def make_model_factory(
      tags: AbstractSet[ModelTag], dataset_req: DatasetReq
  ) -> Callable[[ModelFactoryFn], FnModelFactory]:
      """
      Decorator for turning a function into a :class:`ModelFactory`.
      """
  
      def wrap(fn: ModelFactoryFn) -> FnModelFactory:
          name = fn.__name__
          factory = FnModelFactory(name, tags, dataset_req, fn)
          MODEL_FACTORIES.add(factory)
          return factory
  
      return wrap
  
file_path: GPflow/benchmark/model_api.py
imports: from abc import ABC, abstractmethod
  from typing import AbstractSet, Callable
  import numpy
  from benchmark.dataset_api import DatasetReq, XYData
  from benchmark.registry import TaggedRegistry
  from benchmark.tag import Tag, TagReq
  from gpflow.models import GPModel
label_desc: Use image node_id 1 for calling a global function with example usage: make_model_factory(tags, dataset_req) and returns: wrap, factory