"""Auto-generated stub for module: optimizers."""
from typing import Any

# Constants
logger: Any

# Functions
def build_optimizer(model: Any.Any, config: Any) -> Any.Any:
    """
    Construct the optimizer specified in *config*.
    
        For known names (SGD, Adam, AdamW, Adamax, RMSprop) a base kwargs
        dict is built from ``config`` fields (``learning_rate``,
        ``weight_decay``, ``momentum``).  ``config.optimizer_kwargs`` is
        merged on top, so explicit user values always win.
    
        For any other name the class is looked up dynamically from
        ``torch.optim`` and only ``config.optimizer_kwargs`` (plus ``lr``)
        is forwarded.
    
        Args:
            model: The model whose parameters will be optimized.
            config: Training configuration.
            parameter_groups: Custom parameter iterator.  When ``None``
                (the default), ``model.parameters()`` is used.
    
        Returns:
            A configured :class:`torch.optim.Optimizer`.
    
        Raises:
            ValueError: If the optimizer name cannot be resolved.
    """
    ...
