code: def test_active_cells_from_py_light(
      text="""# + active="py"
  print('should only be displayed in py file')
  
  # + tags=["active-py"]
  print('should only be displayed in py file')
  
  # + active="ipynb"
  # print('only in jupyter')
  """,
  ):
      """Example adapted from https://github.com/mwouts/jupytext/issues/477"""
      nb = jupytext.reads(text, "py")
      assert nb.cells[0].cell_type == "raw"
      assert nb.cells[1].cell_type == "raw"
      assert nb.cells[2].cell_type == "code"
      assert nb.cells[2].source == "print('only in jupyter')"
  
      text2 = jupytext.writes(nb, "py")
      compare(text2, text)
  
file_path: jupytext/tests/functional/others/test_active_cells.py
imports: import pytest
  from nbformat import NotebookNode
  import jupytext
  from jupytext.compare import compare, compare_cells
label_desc: Use image node_id 15 for calling a global function with example usage: test_active_cells_from_py_light(text) without return types