class_docstr: A lexicon that blocks a fixed set of target ids independent of the src_ids.
class_docstr_tok: ["A","lexicon","that","blocks","a","fixed","set","of","target","ids","independent","of","the","src_ids","."]
code: def create(
      self, block_tokens: List[str], vocab_target: Dict[str, List[int]]
  ):
      # We do not default to UNK because we want to only block on real tokens
      # We also exclude any other special symbols
      block_tokens_set = set(block_tokens)
      logger.info(
          f"Creating static block lexicon with tokens: {block_tokens_set}"
      )
      num_not_in_vocab = 0
      block_token_ids = []
      for token in block_tokens:
          if token in C.VOCAB_SYMBOLS:
              continue
          if token not in vocab_target:
              num_not_in_vocab += 1
              continue
          block_token_ids.extend(vocab_target[token])
      block_token_ids = list(set(block_token_ids))
  
      self.lex = np.array(block_token_ids, dtype="int32")
      logger.info(
          "Created static block lexicon with %d tokens, %d skipped because they were not in the vocabulary",
          len(block_token_ids),
          num_not_in_vocab,
      )
  
imports: import argparse
  import collections
  import os
  import sys
  import time
  import logging
  from itertools import groupby
  from operator import itemgetter
  from typing import Dict, Generator, List, Tuple, Optional
  from abc import abstractmethod, ABC
  import numpy
  from sockeye.data_io import SequenceReader
  from .None import arguments
  from .None import constants
  from .None import vocab
  from .utils import smart_open, get_tokens
  from .log import setup_main_logger, log_sockeye_version
label_desc: Use image node_id 2 for calling the StaticBlockLexicon obj's underlying member method code with example usage: obj.create(block_tokens, vocab_target) without return types