code: def do_vcs_install(versionfile_source, ipy):
      """Git-specific installation logic for Versioneer.
  
      For Git, this means creating/changing .gitattributes to mark _version.py
      for export-subst keyword substitution.
      """
      GITS = ["git"]
      if sys.platform == "win32":
          GITS = ["git.cmd", "git.exe"]
      files = [versionfile_source]
      if ipy:
          files.append(ipy)
      try:
          my_path = __file__
          if my_path.endswith(".pyc") or my_path.endswith(".pyo"):
              my_path = os.path.splitext(my_path)[0] + ".py"
          versioneer_file = os.path.relpath(my_path)
      except NameError:
          versioneer_file = "versioneer.py"
      files.append(versioneer_file)
      present = False
      try:
          with open(".gitattributes", "r") as fobj:
              for line in fobj:
                  if line.strip().startswith(versionfile_source):
                      if "export-subst" in line.strip().split()[1:]:
                          present = True
                          break
      except OSError:
          pass
      if not present:
          with open(".gitattributes", "a+") as fobj:
              fobj.write(f"{versionfile_source} export-subst\n")
          files.append(".gitattributes")
      run_command(GITS, ["add", "--"] + files)
  
imports: import configparser
  import errno
  import functools
  import json
  import os
  import re
  import subprocess
  import sys
  from typing import Callable, Dict
label_desc: Use image node_id 8 for calling a global function with example usage: do_vcs_install(versionfile_source, ipy) without return types