code: def validate_dtype(values, valid_dtypes):
      """Test if dtype of values is one of valid_dtypes.
  
      Parameters
      ----------
      values: list-like
      valid_dtypes: list-like
          list of valid dtype strings, e.g., ('int16', 'int32')
  
      Returns
      -------
      boolean:
          True if dtype of values is one of valid_dtypes
      """
      values = numpy.asanyarray(values)
  
      return (
          values.dtype.name in valid_dtypes
          or get_minimum_dtype(values) in valid_dtypes
      )
  
file_path: rasterio/rasterio/dtypes.py
imports: import numpy
  from rasterio.env import GDALVersion
label_desc: Use image node_id 8 for calling a global function with example usage: validate_dtype(values, valid_dtypes) and returns: unknown