code: def test_open_in_browser(monkeypatch):
      opener = Get()
      monkeypatch.setattr(webbrowser, "open", opener)
      doc = html_document.HTMLDocument("hello")
      doc.open_in_browser()
      assert opener.content == b"hello"
  
file_path: nilearn/nilearn/plotting/tests/test_html_document.py
imports: import time
  import webbrowser
  from unittest.mock import Mock
  import pytest
  import requests
  from numpy.testing import assert_no_warnings
  from nilearn.plotting import html_document
label_desc: Use image node_id 1 for calling a global function with example usage: test_open_in_browser(monkeypatch) without return types