class_docstr: Adapter from a function to a :class:`ModelFactory`.
class_docstr_tok: ["Adapter","from","a","function","to","a",":","class",":","`","ModelFactory","`","."]
code: def create_model(
      self, data: XYData, rng: np.random.Generator
  ) -> GPModel:
      assert self.dataset_req.satisfied(data.tags)
      return self._fn(data, rng)
  
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 2 for calling the FnModelFactory obj's underlying member method code with example usage: obj.create_model(data, rng) and returns: self