docstr: Do not add eos again if user already added it.
docstr_tok: ["Do","not","add","eos","again","if","user","already","added","it","."]
code: def _add_eos_if_not_present(self, token_ids: List[int]) -> List[int]:
      """Do not add eos again if user already added it."""
      if len(token_ids) > 0 and token_ids[-1] == self.eos_token_id:
          logging.warn(
              f"This sequence already has {self.eos_token}. In future versions this behavior may lead to duplicated eos tokens being added."
          )
          return token_ids
      else:
          return token_ids + [self.eos_token_id]
  
file_path: DeepKE/src/deepke/name_entity_re/cross/seq2seq/t5_bert_tokenizer.py
imports: import logging
  from typing import Optional, List
  from transformers import BertTokenizer
label_desc: Use image node_id 4 for calling the T5BertTokenizer obj's underlying member method code with example usage: obj._add_eos_if_not_present(token_ids) and returns: token_ids, unknown