code: def test_FromFile(mock_open: MagicMock) -> None:
      obj = buc.FromFile("path.ts")
      assert obj.lang == "typescript"
  
      obj = buc.FromFile("path.js")
      assert obj.lang == "javascript"
  
      obj = buc.FromFile("path.css")
      assert obj.lang == "less"
  
      obj = buc.FromFile("path.less")
      assert obj.lang == "less"
  
file_path: bokeh/tests/unit/bokeh/util/test_compiler.py
imports: from __future__ import annotations
  import pytest
  import json
  import os
  from unittest.mock import MagicMock, patch
  import bokeh.util.compiler
label_desc: Use image node_id 8 for calling a global function with example usage: test_FromFile(mock_open) without return types