code: def generator_accurate_to(
      expected: list[int], accuracy: float
  ) -> t.Callable[[ext.NpNDArray], t.Any]:
      def check(out: ext.NpNDArray) -> t.Any:
          score = metrics.accuracy_score(expected, next(out))
          return score >= accuracy
  
      return check
  
file_path: BentoML/tests/integration/frameworks/models/catboost.py
imports: from __future__ import annotations
  import typing
  from typing import TYPE_CHECKING
  from catboost import CatBoostClassifier
  from sklearn import metrics
  from sklearn.datasets import make_classification
  from sklearn.model_selection import train_test_split
  import bentoml
  from .None import FrameworkTestModel
  from .None import FrameworkTestModelConfiguration
  from .None import FrameworkTestModelInput
label_desc: Use image node_id 2 for calling a global function with example usage: generator_accurate_to(expected, accuracy) and returns: check, unknown