code: def test_external_js_and_css_resource_embedding() -> None:
      """This test method has to be at the end of the test modules because
      subclassing a Model causes the CustomModel to be added as a Model and
      messes up the Resources state for the other tests.
      """
  
      # External resources can be defined as a string or list of strings
      class CustomModel1(Model):
          __javascript__ = "external_js_1"
          __css__ = "external_css_1"
  
      class CustomModel2(Model):
          __javascript__ = ["external_js_2", "external_js_3"]
          __css__ = ["external_css_2", "external_css_3"]
  
      class CustomModel3(Model):
          __javascript__ = ["external_js_1", "external_js_3"]
          __css__ = ["external_css_1", "external_css_2"]
  
      r = resources.Resources()
  
      assert "external_js_1" in r.js_files
      assert "external_css_1" in r.css_files
  
      assert "external_js_2" in r.js_files
      assert "external_js_3" in r.js_files
      assert "external_css_2" in r.css_files
      assert "external_css_3" in r.css_files
  
      # Deduplication should keep the first instance of every file
      assert r.css_files.count("external_css_1") == 1
      assert r.css_files.count("external_css_2") == 1
      assert r.js_files.count("external_js_3") == 1
      assert r.js_files.count("external_js_1") == 1
  
imports: from __future__ import annotations
  import pytest
  import os
  import re
  import subprocess
  import sys
  import bs4
  from packaging.version import Version
  import bokeh.util.version
  from bokeh.models import Model
  from bokeh.resources import RuntimeMessage, _get_cdn_urls
  from bokeh.settings import LogLevel, settings
  import bokeh.resources
label_desc: Use image node_id 2 for calling a global function with example usage: test_external_js_and_css_resource_embedding() without return types