code: def setup(sphinx):
      sys.path.insert(0, os.path.abspath("utils"))  # travis
      sys.path.insert(0, os.path.abspath(opj(pardir, "utils")))  # RTD
      # As of Sphinx v2.1, passing an instance is deprecated.
      # TODO: Remove when minimum sphinx version is at least 2.1.
      import sphinx as sphinx_mod
      from pygments_ansi_color import AnsiColorLexer
  
      sphinx_ver = int(sphinx_mod.__version__.split(".")[0])
      if (
          sphinx_ver < 3
      ):  # Check against 3 rather than 2.1 for simplicity.
          AnsiColorLexer = AnsiColorLexer()
      sphinx.add_lexer("ansi-color", AnsiColorLexer)
  
file_path: datalad/docs/source/conf.py
imports: import datetime
  import os
  import sys
  from glob import glob
  from os import pardir
  from os.path import exists
  from os.path import join
  import datalad
  import sphinx
label_desc: Use image node_id 1 for calling a global function with example usage: setup(sphinx) without return types