code: def combine_vecs(
      question_vec, passage_vec, tokenizer, spec_tok_val=-1
  ):
      """Combine a question_vec and passage_vec in a style that is appropriate to the model. Will add slots in
      the returned vector for special tokens like [CLS] where the value is determine by spec_tok_val.
      """
  
      # Join question_label_vec and passage_label_vec and add slots for special tokens
      vec = tokenizer.build_inputs_with_special_tokens(
          token_ids_0=question_vec, token_ids_1=passage_vec
      )
      if tokenizer.is_fast:
          spec_toks_mask = tokenizer.get_special_tokens_mask(
              token_ids_0=vec, already_has_special_tokens=True
          )
      else:
          spec_toks_mask = tokenizer.get_special_tokens_mask(
              token_ids_0=question_vec, token_ids_1=passage_vec
          )
  
      # If a value in vec corresponds to a special token, it will be replaced with spec_tok_val
      combined = [
          v if not special_token else spec_tok_val
          for v, special_token in zip(vec, spec_toks_mask)
      ]
  
      return combined
  
file_path: FARM/farm/data_handler/nq_utils.py
imports: import logging
  import re
  import numpy
  from farm.data_handler.samples import Sample
label_desc: Use image node_id 3 for calling a global function with example usage: combine_vecs(question_vec, passage_vec, tokenizer, spec_tok_val) and returns: combined