class_docstr: class to return canonical code(s) from code or aliases
  
  The concept is a lot easier to read in the implementation and
  tests than it is to explain, so...
  
  >>> # If you have some codes, and several aliases, like this:
  >>> code1 = 1; aliases1=['one', 'first']
  >>> code2 = 2; aliases2=['two', 'second']
  >>> # You might want to do this:
  >>> codes = [[code1]+aliases1,[code2]+aliases2]
  >>> recodes = Recoder(codes)
  >>> recodes.code['one']
  1
  >>> recodes.code['second']
  2
  >>> recodes.code[2]
  2
  >>> # Or maybe you have a code, a label and some aliases
  >>> codes=((1,'label1','one', 'first'),(2,'label2','two'))
  >>> # you might want to get back the code or the label
  >>> recodes = Recoder(codes, fields=('code','label'))
  >>> recodes.code['first']
  1
  >>> recodes.code['label1']
  1
  >>> recodes.label[2]
  'label2'
  >>> # For convenience, you can get the first entered name by
  >>> # indexing the object directly
  >>> recodes[2]
  2
class_docstr_tok: ["class","to","return","canonical","code","(","s",")","from","code","or","aliases","The","concept","is","a","lot","easier","to","read","in","the","implementation","and","tests","than","it","is","to","explain",",","so","...",">",">",">","#","If","you","have","some","codes",",","and","several","aliases",",","like","this",":",">",">",">","code1","=","1",";","aliases1=","[","'one","'",",","'first","'","]",">",">",">","code2","=","2",";","aliases2=","[","'two","'",",","'second","'","]",">",">",">","#","You","might","want","to","do","this",":",">",">",">","codes","=","[","[","code1","]","+aliases1",",","[","code2","]","+aliases2","]",">",">",">","recodes","=","Recoder","(","codes",")",">",">",">","recodes.code","[","'one","'","]","1",">",">",">","recodes.code","[","'second","'","]","2",">",">",">","recodes.code","[","2","]","2",">",">",">","#","Or","maybe","you","have","a","code",",","a","label","and","some","aliases",">",">",">","codes=","(","(","1",",","'label1","'",",","'one","'",",","'first","'",")",",","(","2",",","'label2","'",",","'two","'",")",")",">",">",">","#","you","might","want","to","get","back","the","code","or","the","label",">",">",">","recodes","=","Recoder","(","codes",",","fields=","(","'code","'",",","'label","'",")",")",">",">",">","recodes.code","[","'first","'","]","1",">",">",">","recodes.code","[","'label1","'","]","1",">",">",">","recodes.label","[","2","]","'label2'",">",">",">","#","For","convenience",",","you","can","get","the","first","entered","name","by",">",">",">","#","indexing","the","object","directly",">",">",">","recodes","[","2","]","2"]
docstr: True if field1 in recoder contains `key`
docstr_tok: ["True","if","field1","in","recoder","contains","`","key","`"]
code: def __contains__(self, key: ty.Hashable) -> bool:
      """True if field1 in recoder contains `key`"""
      return key in self.field1
  
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 5 for calling the Recoder obj's underlying member method code with example usage: obj.__contains__(key) and returns: unknown