code: def generate_variables_file():
      """
      Generate _variables.yml file in the quartodoc project directory
      """
      # Modifying variables file breaks quarto preview
      if variables_filepath.exists():
          return
  
      version = get_version("plotnine")
  
      # The scm-version scheme adds .date suffix to the version
      # if the repo is dirty. For better look while developing,
      # we remove it.
      dirty_pattern = re.compile(r"\.d\d{8}$")
      if dirty_pattern.search(version):
          version = dirty_pattern.sub("", version)
  
      contents = VARIABLES_TPL.format(version=version)
      variables_filepath.write_text(contents)
  
imports: import hashlib
  import re
  import shutil
  from importlib.metadata import version
  from importlib.resources import files
  from pathlib import Path
label_desc: Use image node_id 1 for calling a global function with example usage: generate_variables_file() without return types