Return the integer key for ch. It is the key for the first
        value found in chnames and chnames_0, that matches ch. Or if
        ch is an int, ch is returned if it is a key in self.D
490094
def _key(self, ch):
        """"""

        if ch in self.D:
            return ch

        if isinstance(ch, int):
            raise KeyError(ch)  # dont accept integers as custom names

        if self.chnames:
            for item in self.chnames.items():
                if item[1] == ch:
                    return item[0]
        for item in self.chnames_0.items():
            if item[1] == ch:
                return item[0]

        # If we got here, ch can be an int represented by a string if it comes
        # from a condition string:
        try:
            chint = int(ch)
            if chint in self.D:
                return chint
        except ValueError:
            pass

        raise KeyError(ch)
941655
public String getKey(int key) {
		if (key == 0) 
			return Long.toString(this.getEvaluationIndex());
		else return Long.toString(10000
				* this.getEvaluationIndex()
				+ this.getClassifierIndex());
	}
223180
def key_handle_to_int(this):
    
    try:
        num = int(this)
        return num
    except ValueError:
        if this[:2] == "0x":
            return int(this, 16)
        if (len(this) == 4):
            num = struct.unpack('<I', this)[0]
            return num
    raise pyhsm.exception.YHSM_Error("Could not parse key_handle '%s'" % (this))
414471
def lookup_character_keycode(self, character):
        
        keysym = self.string_to_keysym.get(character, 0)
        if keysym == 0:
            keysym = self.string_to_keysym.get(KEYSYMS[character], 0)
        return self.display.keysym_to_keycode(keysym)
366303
def getone(self, key):
        
        v = self.getall(key)
        if not v:
            raise KeyError('Key not found: %r' % key)
        if len(v) > 1:
            raise KeyError('Multiple values match %r: %r' % (key, v))
        return v[0]
1287405
public int getStartNextPropertyKey(int iIndex, String strMessage)
    {
        for (iIndex = iIndex + 1; iIndex < strMessage.length(); iIndex++)
        {
            char chChar = strMessage.charAt(iIndex);
            if (this.isEndChar(chChar))
                break;
        }
        if (iIndex >= strMessage.length())
            return -1;
        int iNextProperty = strMessage.indexOf(END_OF_KEY_CHAR, iIndex);
        if (iNextProperty == -1)
            return -1;  // Not found
        for (int i = iNextProperty - 1; i >= 0; i--)
        {
            char chChar = strMessage.charAt(i);
            if (this.isEndChar(chChar))
            {   // Key always starts on a new line.
                for (int k = i + 1; k < strMessage.length(); k++)
                {   // Now go forward to the first character.
                    chChar = strMessage.charAt(k);
                    if (!this.isLeadingWhitespace(chChar))
                    {
                        return k;
                    }
                }
            }
        }
        return -1;
    }
590577
final int getIndexValue() {
        if (anteContextLength == pattern.length()) {
            // A pattern with just ante context {such as foo)>bar} can
            // match any key.
            return -1;
        }
        int c = UTF16.charAt(pattern, anteContextLength);
        return data.lookupMatcher(c) == null ? (c & 0xFF) : -1;
    }
1207824
public Integer getInteger(Class<?> cls, String key)
   {
	   return getInteger(cls.getName()+"."+key);
	   
   }
374801
def _key_name(self):  # type: () -> str
        
        if self._key is not None:
            return self._key

        return self.__class__.__name__.lower()
925532
def get_int_or_uuid(value):
    
    try:
        uuid.UUID(value)
        return value
    except (ValueError, AttributeError):
        return int(value)
371642
def get_index(self, key):
        
        try:
            return self[self.index_lookup.get(key)]

        except TypeError:
            raise KeyError
1353288
def get_index(self, key: Hashable) -> pd.Index:
        
        if key not in self.dims:
            raise KeyError(key)

        try:
            return self.indexes[key]
        except KeyError:
            # need to ensure dtype=int64 in case range is empty on Python 2
            return pd.Index(range(self.sizes[key]), name=key, dtype=np.int64)
813757
private int findKey(K key) {
    int i = 0;
    for (K otherKey : this.keys) {
      if (this.comparator.compare(key, otherKey) == 0) {
        return i;
      }
      i++;
    }
    return -1;
  }
274853
def get_id(self):
        
        if self._id is None:
            # FIXME: provide a better error message when key is not defined
            self._id = self.inspect(refresh=False)["Id"]
        return self._id
1155599
def get_from_human_key(self, key):
        """"""
        if key in self._identifier_map:
            return self._identifier_map[key]
        raise KeyError(key)
213815
public IntSet intKeySet ()
    {
        // damn Sun bastards made the 'keySet' variable with default access, so we can't share it
        if (_keySet == null) {
            _keySet = new AbstractIntSet() {
                public Interator interator () {
                    return new AbstractInterator () {
                        public boolean hasNext () {
                            return i.hasNext();
                        }
                        public int nextInt () {
                            return i.next().getIntKey();
                        }
                        @Override public void remove () {
                            i.remove();
                        }
                        private Iterator<IntEntry<V>> i = intEntrySet().iterator();
                    };
                }

                @Override public int size () {
                    return HashIntMap.this.size();
                }

                @Override public boolean contains (int t) {
                    return HashIntMap.this.containsKey(t);
                }

                @Override public boolean remove (int value) {
                    Record<V> removed = removeImpl(value, true);
                    return (removed != null);
                }
            };
        }
        return _keySet;
    }
638303
def lookup_key(self):
        
        parts = set()
        for node in self.simple_selectors:
            for token in node.tokens:
                if token[0] not in ':[':
                    parts.add(token)

        if not parts:
            # Should always have at least ONE key; selectors with no elements,
            # no classes, and no ids can be indexed as None to avoid a scan of
            # every selector in the entire document
            parts.add(None)

        return frozenset(parts)