code: def _check_vocab_has_same_index(vocab, other_vocab):
      """
      检查两个vocabulary是否含有相同的word idx
  
      :param Vocabulary vocab:
      :param Vocabulary other_vocab:
      :return:
      """
      if other_vocab != vocab:
          for word, word_ix in vocab:
              other_word_idx = other_vocab.to_index(word)
              assert (
                  other_word_idx == word_ix
              ), f"Word {word} has different index in vocabs, {word_ix} Vs. {other_word_idx}."
  
imports: import numpy
  from ...envs.imports import _NEED_IMPORT_TORCH
  from ...core.vocabulary import Vocabulary
label_desc: Use image node_id 4 for calling a global function with example usage: _check_vocab_has_same_index(vocab, other_vocab) without return types