class_docstr: Module that can act both as a lazy-loader and as a proxy.
  
  Notes
  -----
  We do NOT register this module with `sys.modules` so as not to cause
  confusion in the global environment. This way we have a valid proxy
  module for our own use, but it lives *exclusively* within polars.
class_docstr_tok: ["Module","that","can","act","both","as","a","lazy-loader","and","as","a","proxy",".","Notes","--","--","-","We","do","NOT","register","this","module","with","`","sys.modules","`","so","as","not","to","cause","confusion","in","the","global","environment",".","This","way","we","have","a","valid","proxy","module","for","our","own","use",",","but","it","lives","*","exclusively","*","within","polars","."]
docstr: Initialise lazy-loading proxy module.
  
  Parameters
  ----------
  module_name : str
      the name of the module to lazy-load (if available).
  
  module_available : bool
      indicate if the referenced module is actually available (we will proxy it
      in both cases, but raise a helpful error when invoked if it doesn't exist).
docstr_tok: ["Initialise","lazy-loading","proxy","module",".","Parameters","--","--","--","--","--","module_name",":","str","the","name","of","the","module","to","lazy-load","(","if","available",")",".","module_available",":","bool","indicate","if","the","referenced","module","is","actually","available","(","we","will","proxy","it","in","both","cases",",","but","raise","a","helpful","error","when","invoked","if","it","does","n't","exist",")","."]
code: def __init__(
      self,
      module_name: str,
      *,
      module_available: bool,
  ) -> None:
      """
      Initialise lazy-loading proxy module.
  
      Parameters
      ----------
      module_name : str
          the name of the module to lazy-load (if available).
  
      module_available : bool
          indicate if the referenced module is actually available (we will proxy it
          in both cases, but raise a helpful error when invoked if it doesn't exist).
  
      """
      self._module_available = module_available
      self._module_name = module_name
      self._globals = globals()
      super().__init__(module_name)
  
file_path: polars/py-polars/polars/dependencies.py
imports: from __future__ import annotations
  import re
  import sys
  from functools import lru_cache
  from importlib import import_module
  from importlib.util import find_spec
  from types import ModuleType
  from typing import TYPE_CHECKING, Any, ClassVar, Hashable, cast
label_desc: Use image node_id 1 to create a new _LazyModule object from inherited base classes: ModuleType with example: obj = _LazyModule(module_name)