class_docstr: Lazily import a module, mainly to avoid pulling in large dependencies.
class_docstr_tok: ["Lazily","import","a","module",",","mainly","to","avoid","pulling","in","large","dependencies","."]
code: def __dir__(self) -> List[str]:
      if not self.module:
          self.module = self._load()
      return dir(self.module)
  
file_path: xgboost/python-package/xgboost/compat.py
imports: import importlib.util
  import logging
  import sys
  import types
  from typing import Any, Dict, List, Optional, Sequence, cast
  import numpy
  from ._typing import _T
label_desc: Use image node_id 4 for calling the LazyLoader obj's underlying member method code with example usage: obj.__dir__() and returns: dir