code: def use_shared_vocab(args: argparse.Namespace) -> bool:
      
      weight_tying = args.weight_tying
      weight_tying_type = args.weight_tying_type
      shared_vocab = args.shared_vocab
      decoder_only = args.decoder_only
      if weight_tying and C.WEIGHT_TYING_SRC in weight_tying_type and C.WEIGHT_TYING_TRG in weight_tying_type:
          if not shared_vocab:
              logger.info("A shared source/target vocabulary will be used as weight tying source/target weight tying "
                          "is enabled")
          shared_vocab = True
      if decoder_only:
          if not shared_vocab:
              logger.info("A shared source/target vocabulary will be used for pre-training the decoder.")
          shared_vocab = True
      return shared_vocab
docs: True if arguments entail a shared source and target vocabulary.
  
      :param: args: Arguments as returned by argparse.