def get_symbol(self, index):
    """Map index to symbol with that id.

    Args:
      index: integer id of an entity

    Returns:
      string for that symbol

    Raises:
      RuntimeError: If the id value exceeds a fixed vocabulary size.
    """

    if index < len(self._symbol_list):
      return self._symbol_list[index]
    elif self._vocab_size and index < self._vocab_size:
      return '<PAD%03d>' % index
    else:
      raise RuntimeError(
          'Index %d is not smaller than limit %d.' % (index, self._vocab_size))
Map index to symbol with that id.

    Args:
      index: integer id of an entity

    Returns:
      string for that symbol

    Raises:
      RuntimeError: If the id value exceeds a fixed vocabulary size.
    
language/nql/nql/symbol.py