code: def get_minimum_dtype(values):
      """Determine minimum type to represent values.
  
      Uses range checking to determine the minimum integer or floating point
      data type required to represent values.
  
      Parameters
      ----------
      values: list-like
  
  
      Returns
      -------
      rasterio dtype string
      """
      values = numpy.asanyarray(values)
      min_value = values.min()
      max_value = values.max()
  
      if values.dtype.kind in {"i", "u"}:
          if min_value >= 0:
              if max_value <= 255:
                  return uint8
              elif max_value <= 65535:
                  return uint16
              elif max_value <= 4294967295:
                  return uint32
              if not _GDAL_AT_LEAST_35:
                  raise ValueError(
                      "Values out of range for supported dtypes"
                  )
              return uint64
          elif min_value >= -128 and max_value <= 127:
              return int8
          elif min_value >= -32768 and max_value <= 32767:
              return int16
          elif min_value >= -2147483648 and max_value <= 2147483647:
              return int32
          if not _GDAL_AT_LEAST_35:
              raise ValueError(
                  "Values out of range for supported dtypes"
              )
          return int64
      else:
          if min_value >= -3.4028235e38 and max_value <= 3.4028235e38:
              return float32
          return float64
  
file_path: rasterio/rasterio/dtypes.py
imports: import numpy
  from rasterio.env import GDALVersion
label_desc: Use image node_id 5 for calling a global function with example usage: get_minimum_dtype(values) and returns: int64, float64, uint64, float32, uint8, int8, uint16, int16, uint32, int32