code: def _get_eval_func_closure(
      eval_func: Callable[[AnyNDArray], Tuple[AnyNDArray, AnyNDArray]]
  ) -> Any:
      assert eval_func.__closure__ is not None  # type: ignore[attr-defined]
      return eval_func.__closure__[0].cell_contents
  
imports: import unittest
  import warnings
  from typing import Any, Callable, Dict, List, Sequence, Tuple
  from unittest.mock import MagicMock
  import numpy
  import pytest
  import tensorflow
  from packaging.version import Version
  import gpflow
  from gpflow.base import AnyNDArray
  from gpflow.config import default_float
  from gpflow.models import GPR, GPModel
  from gpflow.optimizers.scipy import LossClosure
label_desc: Use image node_id 9 for calling a global function with example usage: _get_eval_func_closure(eval_func) and returns: eval_func