code: def test_numpy_openapi_example():
      r = NumpyNdarray().openapi_example()
      assert r is None
  
      r = from_example.openapi_example()
      assert r == example.tolist()
  
      nparray = NumpyNdarray(dtype="float")
      nparray.sample = ExampleGeneric("asdf")
      with pytest.raises(BadInput):
          nparray.openapi_example()
  
imports: from __future__ import annotations
  import logging
  from functools import partial
  from typing import TYPE_CHECKING
  import numpy
  import pytest
  from bentoml._internal.service.openapi.specification import Schema
  from bentoml.exceptions import BadInput
  from bentoml.exceptions import BentoMLException
  from bentoml.grpc.utils import import_generated_stubs
  from bentoml.io import NumpyNdarray
label_desc: Use image node_id 6 for calling a global function with example usage: test_numpy_openapi_example() without return types