code: def _get_integer_key(key, explanation):
      if key is not None and not isinstance(key, int):
          series = explanation.selector[explanation.selector.columns[0]]
          if key not in series.values:  # pragma: no cover
              raise ValueError(
                  "Key {} not in explanation's selector".format(key)
              )
          key = series[series == key].index[0]
  
      return key
  
file_path: interpret/python/interpret-core/interpret/visual/_interactive.py
imports: import sys
  import logging
  from ..provider import AutoVisualizeProvider, PreserveProvider, DashProvider
label_desc: Use image node_id 8 for calling a global function with example usage: _get_integer_key(key, explanation) and returns: key