class_docstr: Amend footnote div with duplicates. 
class_docstr_tok: ["Amend","footnote","div","with","duplicates","."]
docstr: Adjust current `li` and add the duplicates: `fnref2`, `fnref3`, etc. 
docstr_tok: ["Adjust","current","`","li","`","and","add","the","duplicates",":","`","fnref2","`",",","`","fnref3","`",",","etc","."]
code: def add_duplicates(self, li: etree.Element, duplicates: int) -> None:
      """Adjust current `li` and add the duplicates: `fnref2`, `fnref3`, etc."""
      for link in li.iter("a"):
          # Find the link that needs to be duplicated.
          if link.attrib.get("class", "") == "footnote-backref":
              ref, rest = link.attrib["href"].split(
                  self.footnotes.get_separator(), 1
              )
              # Duplicate link the number of times we need to
              # and point the to the appropriate references.
              links = []
              for index in range(2, duplicates + 1):
                  sib_link = copy.deepcopy(link)
                  sib_link.attrib["href"] = "%s%d%s%s" % (
                      ref,
                      index,
                      self.footnotes.get_separator(),
                      rest,
                  )
                  links.append(sib_link)
                  self.offset += 1
              # Add all the new duplicate links.
              el = list(li)[-1]
              for link in links:
                  el.append(link)
              break
  
imports: from __future__ import annotations
  from .None import Extension
  from ..blockprocessors import BlockProcessor
  from ..inlinepatterns import InlineProcessor
  from ..treeprocessors import Treeprocessor
  from ..postprocessors import Postprocessor
  from ..None import util
  from collections import OrderedDict
  import re
  import copy
  import xml.etree.ElementTree
label_desc: Use image node_id 2 for calling the FootnotePostTreeprocessor obj's underlying member method code with example usage: obj.add_duplicates(li, duplicates) without return types