code: def get_qmd_frontmatter(path):
      data = []
      with open(path) as f:
          line = f.readline().rstrip()
          assert (
              line == "---"
          ), "qmd document must start with '---' on first line"
          for line in f:
              if line.rstrip() == "---":
                  break
              data.append(line)
  
          if line.rstrip() != "---":
              log.warning(
                  "qmd missing closing delimmiter for document frontmatter"
              )
  
          return yaml.safe_load("".join(data))
  
file_path: guildai/guild/plugins/quarto_document.py
imports: import logging
  import os
  import yaml
  from guild import config
  from guild import guildfile
  from guild import model
  from guild import plugin
label_desc: Use image node_id 2 for calling a global function with example usage: get_qmd_frontmatter(path) and returns: yaml