code: def extract_ontology_vocab(target_dictionary):
      fixed_generation_vocab = []
      for i, symbol in enumerate(target_dictionary._vocab):
          lower_symbol = symbol.lower()
          if lower_symbol[0] == "[" or lower_symbol == "]":
              fixed_generation_vocab.append(i)
      return fixed_generation_vocab
  
file_path: pytext/pytext/models/seq_models/utils.py
imports: import logging
  from typing import Dict, List, Optional
  import torch
  import torch.nn.functional
  from torch import nn, Tensor
label_desc: Use image node_id 7 for calling a global function with example usage: extract_ontology_vocab(target_dictionary) and returns: fixed_generation_vocab