code: def test_numpy_to_openapi_types(dtype: str, expected: str):
      assert NumpyNdarray(dtype=dtype)._openapi_types() == expected
  
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 2 for calling a global function with example usage: test_numpy_to_openapi_types(dtype, expected) without return types