def __getattr__(name: str):
    """
    Handles lazy access to transformer-dependent attributes.
    If 'transformers' is not installed, raises a user-friendly ImportError.
    """
    if not _TRANSFORMERS_AVAILABLE:
        raise ImportError(
            f"The attribute '{name}' requires the 'transformers' library, which is not installed.\n"
            f"Please install it with `pip install transformers` to use this functionality."
        )

    if name == "AutoLigerKernelForCausalLM":
        module = importlib.import_module("liger_kernel.transformers.auto_model")
        return getattr(module, name)

    monkey_patch_symbols = {
        "_apply_liger_kernel",
        "_apply_liger_kernel_to_instance",
        "apply_liger_kernel_to_gemma",
        "apply_liger_kernel_to_gemma2",
        "apply_liger_kernel_to_gemma3",
        "apply_liger_kernel_to_gemma3_text",
        "apply_liger_kernel_to_glm4",
        "apply_liger_kernel_to_granite",
        "apply_liger_kernel_to_llama",
        "apply_liger_kernel_to_llava",
        "apply_liger_kernel_to_mistral",
        "apply_liger_kernel_to_mixtral",
        "apply_liger_kernel_to_mllama",
        "apply_liger_kernel_to_olmo2",
        "apply_liger_kernel_to_paligemma",
        "apply_liger_kernel_to_phi3",
        "apply_liger_kernel_to_qwen2",
        "apply_liger_kernel_to_qwen2_5_vl",
        "apply_liger_kernel_to_qwen2_vl",
        "apply_liger_kernel_to_qwen3",
        "apply_liger_kernel_to_qwen3_moe",
    }

    if name in monkey_patch_symbols:
        module = importlib.import_module("liger_kernel.transformers.monkey_patch")
        return getattr(module, name)

    raise AttributeError(f"module {__name__} has no attribute {name}")

    Handles lazy access to transformer-dependent attributes.
    If 'transformers' is not installed, raises a user-friendly ImportError.
    
src/liger_kernel/transformers/__init__.py