docs: def get(cls, key):
          """
          str, int or Enum => Enum
          """
          if isinstance(key, Enum) and not isinstance(key, cls):
              raise TypeError("Cannot type cast between enums")
          if isinstance(key, int):
              if not int(key) in cls._values:
                  raise KeyError("There is no enum with key %d" % key)
              return cls._values[key]
          if isinstance(key, (str, unicode)):
              if not key in cls._names:
                  raise KeyError("There is no enum with name %s" % key)
              return cls._names[key]
          raise TypeError("Invalid enum key type: %s"
                           % (key.__class__.__name__))