code: def test_read_format_from_metadata(
      script="""---
  jupyter:
    jupytext:
      formats: ipynb,pct.py:percent,lgt.py:light,spx.py:sphinx,md,Rmd
      text_representation:
        extension: .pct.py
        format_name: percent
        format_version: '1.1'
        jupytext_version: 0.8.0
  ---""",
  ):
      assert read_format_from_metadata(script, ".Rmd") is None
  
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 15 for calling a global function with example usage: test_read_format_from_metadata(script) without return types