code: def _remove_footnote_trailing_space(lines):
      seen_discussion_url = False
      for i, l in enumerate(lines):
          if l.startswith("\sphinxnolinkurl{"):
              lines[i] += "\\sphinxAtStartFootnote"
          if l.startswith("\\sphinxhref{https://discuss.d2l.ai/t/"):
              seen_discussion_url = True
          if seen_discussion_url and l.startswith("\\end{footnote}"):
              lines[i] += "."
              seen_discussion_url = False
  
file_path: d2l-en/static/post_latex/main.py
imports: import os
  import re
  import regex
  import sys
label_desc: Use image node_id 11 for calling a global function with example usage: _remove_footnote_trailing_space(lines) without return types