class_docstr: Specialized mapper for numpy dtypes
  
  We pass this mapper into the Recoder class to deal with numpy dtype
  hashing.
  
  The hashing problem is that dtypes that compare equal may not have the same
  hash.  This is true for numpys up to the current at time of writing
  (1.6.0).  For numpy 1.2.1 at least, even dtypes that look exactly the same
  in terms of fields don't always have the same hash.  This makes dtypes
  difficult to use as keys in a dictionary.
  
  This class wraps a dictionary in order to implement a __getitem__ to deal
  with dtype hashing. If the key doesn't appear to be in the mapping, and it
  is a dtype, we compare (using ==) all known dtype keys to the input key,
  and return any matching values for the matching key.
class_docstr_tok: ["Specialized","mapper","for","numpy","dtypes","We","pass","this","mapper","into","the","Recoder","class","to","deal","with","numpy","dtype","hashing",".","The","hashing","problem","is","that","dtypes","that","compare","equal","may","not","have","the","same","hash",".","This","is","true","for","numpys","up","to","the","current","at","time","of","writing","(","1.6.0",")",".","For","numpy","1.2.1","at","least",",","even","dtypes","that","look","exactly","the","same","in","terms","of","fields","do","n't","always","have","the","same","hash",".","This","makes","dtypes","difficult","to","use","as","keys","in","a","dictionary",".","This","class","wraps","a","dictionary","in","order","to","implement","a","__getitem__","to","deal","with","dtype","hashing",".","If","the","key","does","n't","appear","to","be","in","the","mapping",",","and","it","is","a","dtype",",","we","compare","(","using","==",")","all","known","dtype","keys","to","the","input","key",",","and","return","any","matching","values","for","the","matching","key","."]
docstr: Get item from mapping, checking for dtype keys
  
  First do simple hash lookup, then check for a dtype key that has failed
  the hash lookup.  Look then for any known dtype keys that compare equal
  to `key`.
docstr_tok: ["Get","item","from","mapping",",","checking","for","dtype","keys","First","do","simple","hash","lookup",",","then","check","for","a","dtype","key","that","has","failed","the","hash","lookup",".","Look","then","for","any","known","dtype","keys","that","compare","equal","to","`","key","`","."]
code: def __getitem__(self, key: ty.Hashable) -> ty.Hashable:
      """Get item from mapping, checking for dtype keys
  
      First do simple hash lookup, then check for a dtype key that has failed
      the hash lookup.  Look then for any known dtype keys that compare equal
      to `key`.
      """
      try:
          return super().__getitem__(key)
      except KeyError:
          pass
      if isinstance(key, np.dtype):
          for dt in self._dtype_keys:
              if key == dt:
                  return super().__getitem__(dt)
      raise KeyError(key)
  
imports: from __future__ import annotations
  import io
  import sys
  import typing
  import warnings
  from functools import reduce
  from operator import getitem, mul
  from os.path import exists, splitext
  import numpy
  from ._compression import COMPRESSED_FILE_LIKES
  from .casting import OK_FLOATS, shared_range
  from .externals.oset import OrderedSet
label_desc: Use image node_id 3 for calling the DtypeMapper obj's underlying member method code with example usage: obj.__getitem__(key) and returns: super, super