docstr: Add up to self.max_tags * 2 placeholders to src and tgt vocabs.
docstr_tok: ["Add","up","to","self.max_tags","*","2","placeholders","to","src","and","tgt","vocabs","."]
code: def get_specials(cls, opts):
      """Add up to self.max_tags * 2 placeholders to src and tgt vocabs."""
  
      # Check if the tags include the
      # mandatory "#" number placeholder"
      if (
          "#" not in opts.paired_stag
          or "#" not in opts.paired_etag
          or "#" not in opts.isolated_tag
      ):
          logger.error(
              "Inline tags must include the number " 'placeholder "#"'
          )
  
      # We split the user-defined tags in the # placeholder
      # in order to number them
      paired_stag_prefix, paired_stag_suffix = map(
          str, opts.paired_stag.split("#")
      )
      paired_etag_prefix, paired_etag_suffix = map(
          str, opts.paired_etag.split("#")
      )
      isolated_tag_prefix, isolated_tag_suffix = map(
          str, opts.isolated_tag.split("#")
      )
  
      src_specials, tgt_specials = list(), list()
      tags = list()
      for i in range(1, opts.max_tags * 2):
          tags.extend(
              [
                  paired_stag_prefix + str(i) + paired_stag_suffix,
                  paired_etag_prefix + str(i) + paired_etag_suffix,
                  isolated_tag_prefix + str(i) + isolated_tag_suffix,
              ]
          )
  
      src_specials.extend(tags)
      tgt_specials.extend(tags)
  
      return (src_specials, tgt_specials)
  
imports: from onmt.utils.logging import logger
  from onmt.transforms import register_transform
  from .transform import Transform
  import random
  import ahocorasick
  import string
label_desc: Use image node_id 4 for calling the InlineTagsTransform obj's underlying member method code with example usage: obj.get_specials(cls, opts) and returns: src_specials,  tgt_specials