code: def get_roberta_seq_2_start(input_ids):
      # This commit (https://github.com/huggingface/transformers/commit/dfe012ad9d6b6f0c9d30bc508b9f1e4c42280c07)from
      # huggingface transformers now means that RobertaTokenizer.encode_plus returns only zeros in token_type_ids. Therefore, we need
      # another way to infer the start of the second input sequence in RoBERTa. Roberta input sequences have the following
      # format: <s> P1 </s> </s> P2 </s>
      # <s> has index 0 and </s> has index 2. To find the beginning of the second sequence, this function first finds
      # the index of the second </s>
      first_backslash_s = input_ids.index(2)
      second_backslash_s = input_ids.index(2, first_backslash_s + 1)
      return second_backslash_s + 1
  
imports: import logging
  from farm.data_handler.samples import Sample
  from farm.data_handler.utils import expand_labels, pad
  from farm.modeling.tokenization import insert_at_special_tokens_pos
  import numpy
label_desc: Use image node_id 2 for calling a global function with example usage: get_roberta_seq_2_start(input_ids) and returns: unknown