code: def test_write_invalid_dtype():
      dtypes = ["int64", "uint64"]
      if np.dtype("int").itemsize == 8:  # 64-bit machines
          dtypes.append("int")
      if np.dtype("uint").itemsize == 8:  # 64-bit machines
          dtypes.append("uint")
  
      with netcdf_file(BytesIO(), "w") as f:
          f.createDimension("time", N_EG_ELS)
          for dt in dtypes:
              with pytest.raises(ValueError):
                  f.createVariable("time", dt, ("time",))
  
file_path: nibabel/nibabel/externals/tests/test_netcdf.py
imports: import os
  from os.path import join, dirname
  from io import BytesIO
  from glob import glob
  from contextlib import contextmanager
  import numpy
  import pytest
  from ..netcdf import netcdf_file
label_desc: Use image node_id 7 for calling a global function with example usage: test_write_invalid_dtype() without return types