code: def citation_sub(m):
      groups = {
          k: re.sub(r"\s+", " ", v)
          for k, v in m.groupdict().items()
          if v
      }
      fmt = ".. {ref} {author}."
      if "organization" in groups:
          fmt += " {organization}."
      fmt += " {date}."
      if "url" in groups:
          fmt += ' "`{title} <{url}>`__".'
      else:
          fmt += ' "{title}".'
      return fmt.format(**groups)
  
file_path: evadb/docs/extensions/mps/designs.py
imports: from __future__ import unicode_literals
  import glob
  import os
  import os.path
  import re
  import shutil
label_desc: Use image node_id 2 for calling a global function with example usage: citation_sub(m) and returns: fmt