code: def test_dtype(simple_dtype):
      from pybind11_tests import (
          print_dtypes,
          test_dtype_ctors,
          test_dtype_methods,
          trailing_padding_dtype,
          buffer_to_dtype,
      )
  
      assert print_dtypes() == [
          simple_dtype_fmt(),
          packed_dtype_fmt(),
          "[('a', {}), ('b', {})]".format(
              simple_dtype_fmt(), packed_dtype_fmt()
          ),
          partial_dtype_fmt(),
          partial_nested_fmt(),
          "[('a', 'S3'), ('b', 'S3')]",
          "[('e1', '<i8'), ('e2', 'u1')]",
          "[('x', 'i1'), ('y', '<u8')]",
      ]
  
      d1 = np.dtype(
          {
              "names": ["a", "b"],
              "formats": ["int32", "float64"],
              "offsets": [1, 10],
              "itemsize": 20,
          }
      )
      d2 = np.dtype([("a", "i4"), ("b", "f4")])
      assert test_dtype_ctors() == [
          np.dtype("int32"),
          np.dtype("float64"),
          np.dtype("bool"),
          d1,
          d1,
          np.dtype("uint32"),
          d2,
      ]
  
      assert test_dtype_methods() == [
          np.dtype("int32"),
          simple_dtype,
          False,
          True,
          np.dtype("int32").itemsize,
          simple_dtype.itemsize,
      ]
  
      assert trailing_padding_dtype() == buffer_to_dtype(
          np.zeros(1, trailing_padding_dtype())
      )
  
file_path: turicreate/src/external/coremltools_wrap/coremltools/deps/pybind11/tests/test_numpy_dtypes.py
imports: import re
  import pytest
label_desc: Use image node_id 11 for calling a global function with example usage: test_dtype(simple_dtype) without return types