class_docstr: Compile and run Python source code.
  
      
docstr: Make a fresh module to run in.
  
  Returns:
      Module
docstr_tok: ["Make","a","fresh","module","to","run","in",".","Returns",":","Module"]
code: def new_module(self) -> ModuleType | None:
      """Make a fresh module to run in.
  
      Returns:
          Module
  
      """
      self.reset_run_errors()
  
      if self._code is None:
          return None
  
      module_name = "bokeh_app_" + make_globally_unique_id().replace(
          "-", ""
      )
      module = ModuleType(module_name)
      module.__dict__["__file__"] = os.path.abspath(self._path)
      if self._package:
          module.__package__ = self._package.__name__
          module.__path__ = [os.path.dirname(self._path)]
      if basename(self.path) == "__init__.py":
          module.__package__ = module_name
          module.__path__ = [os.path.dirname(self._path)]
  
      return module
  
imports: from __future__ import annotations
  import logging
  import os
  import sys
  import traceback
  from os.path import basename
  from types import CodeType, ModuleType
  from typing import Callable
  from ...core.types import PathLike
  from ...util.serialization import make_globally_unique_id
  from .handler import handle_exception
label_desc: Use image node_id 8 for calling the CodeRunner obj's underlying member method code with example usage: obj.new_module() and returns: module, None