code: def test_divine_format():
      assert divine_format('{"cells":[]}') == "ipynb"
      assert (
          divine_format(
              """def f(x):
      x + 1"""
          )
          == "py:light"
      )
      assert (
          divine_format(
              """# %%
  def f(x):
      x + 1
  
  # %%
  def g(x):
      x + 2
  """
          )
          == "py:percent"
      )
      assert (
          divine_format(
              """This is a markdown file
  with one code block
  
  ```
  1 + 1
  ```
  """
          )
          == "md"
      )
      assert (
          divine_format(
              """;; ---
  ;; jupyter:
  ;;   jupytext:
  ;;     text_representation:
  ;;       extension: .ss
  ;;       format_name: percent
  ;; ---"""
          )
          == "ss:percent"
      )
  
imports: import pytest
  from nbformat.v4.nbbase import new_notebook
  import jupytext
  from jupytext.compare import compare
  from jupytext.formats import JupytextFormatError, divine_format, get_format_implementation, guess_format, long_form_multiple_formats, read_format_from_metadata, rearrange_jupytext_metadata, short_form_multiple_formats, update_jupytext_formats_metadata, validate_one_format
label_desc: Use image node_id 8 for calling a global function with example usage: test_divine_format() without return types