code: def test_read_ipynb_from_stream():
      def stream():
          return StringIO(
              """{
   "cells": [
    {
     "cell_type": "code",
     "metadata": {},
     "source": [
      "1 + 1"
     ]
    }
   ],
   "metadata": {},
   "nbformat": 4,
   "nbformat_minor": 4
  }
  """
          )
  
      nb = jupytext.read(stream())
      nb2 = jupytext.read(stream(), fmt="ipynb")
      compare(nb2, nb)
  
file_path: jupytext/tests/functional/others/test_read_write_functions.py
imports: from io import StringIO
  from pathlib import Path
  import nbformat
  from nbformat.v4.nbbase import new_markdown_cell, new_notebook
  import jupytext
  from jupytext.compare import compare, compare_notebooks
label_desc: Use image node_id 4 for calling a global function with example usage: test_read_ipynb_from_stream() and returns: StringIO