def METHOD_NAME():
    nbtext = """
    {
        "cells": [],
        "metadata": {},
        "nbformat": 4,
        "nbformat_minor": 2
    }
    """
    tmp_dir = scratch_path / "is_jupyter_notebook"
    tmp_dir.mkdir()
    f = (tmp_dir / "sample.txt").open("w")
    assert not util.is_jupyter_notebook(f.name)
    f = (tmp_dir / "null.ipynb").open("w")
    assert util.is_jupyter_notebook(f.name, check_contents=False)
    assert not util.is_jupyter_notebook(f.name)
    f = (tmp_dir / "basic.ipynb").open("w")
    f.write(nbtext)
    f.close()
    assert util.is_jupyter_notebook(f.name)
    f = (tmp_dir / "random.ipynb").open("w")
    f.write('{"random": [1,2,3]}')
    f.close()
    assert not util.is_jupyter_notebook(f.name)