class_docstr: Lexicon component that potentially restricts the set of output words.
  
  If `is_blocking()` is True the set of target ids pose a negative constraint as tokens ids that must not be used on
  the target side. Conversely, if `is_blocking` is False the lexicon poses a positive constraint of returning the set
  of allowed target words.
class_docstr_tok: ["Lexicon","component","that","potentially","restricts","the","set","of","output","words",".","If","`","is_blocking","(",")","`","is","True","the","set","of","target","ids","pose","a","negative","constraint","as","tokens","ids","that","must","not","be","used","on","the","target","side",".","Conversely",",","if","`","is_blocking","`","is","False","the","lexicon","poses","a","positive","constraint","of","returning","the","set","of","allowed","target","words","."]
docstr: If true use get_blocked_trg_ids to obtain blocked ids, otherwise use get_allowed_trg_ids to get allowed
  target ids(inverts the meaning of the target ids).
code: def is_blocking(self) -> bool:
      """If true use get_blocked_trg_ids to obtain blocked ids, otherwise use get_allowed_trg_ids to get allowed
      target ids(inverts the meaning of the target ids)."""
      raise NotImplementedError()
  
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 4 for calling the RestrictLexicon obj's underlying member method code with example usage: obj.is_blocking() without return types