code: def test_CustomJS_from_code_mjs() -> None:
      slider = Slider()
      with patch(
          "builtins.open",
          mock_open(read_data="export default () => 'ESM'"),
      ):
          cb = CustomJS.from_file(
              Path("some/module.mjs"), some="something", slider=slider
          )
      assert cb.module is True
      assert cb.code == "export default () => 'ESM'"
      assert cb.args == dict(some="something", slider=slider)
  
file_path: bokeh/tests/unit/bokeh/models/test_callbacks__models.py
imports: from __future__ import annotations
  import pytest
  from pathlib import Path
  from unittest.mock import mock_open, patch
  from pytest import raises
  from bokeh.models import Slider
  from bokeh.models import CustomJS
label_desc: Use image node_id 2 for calling a global function with example usage: test_CustomJS_from_code_mjs() without return types