code: def notebook_to_qmd(notebook):
      """Convert a Jupyter notebook to its Quarto Markdown representation"""
      raise_if_quarto_is_not_available()
      tmp_ipynb_file = tempfile.NamedTemporaryFile(
          delete=False, suffix=".ipynb"
      )
      tmp_ipynb_file.write(ipynb_writes(notebook).encode("utf-8"))
      tmp_ipynb_file.close()
  
      quarto("convert --log-level warning", tmp_ipynb_file.name)
  
      tmp_qmd_file_name = tmp_ipynb_file.name[:-6] + ".qmd"
  
      with open(tmp_qmd_file_name, encoding="utf-8") as qmd_file:
          text = qmd_file.read()
  
      os.unlink(tmp_ipynb_file.name)
      os.unlink(tmp_qmd_file_name)
  
      return "\n".join(text.splitlines())
  
file_path: jupytext/src/jupytext/quarto.py
imports: import os
  import subprocess
  import tempfile
  from nbformat import reads
  from nbformat import writes
  from packaging.version import parse
label_desc: Use image node_id 6 for calling a global function with example usage: notebook_to_qmd(notebook) and returns: str