def get_args(checkpoint):
    """Extract and fix arguments stored in the checkpoint."""
    args = checkpoint["args"]
    if not hasattr(args, 'ada_groups'):
        args.ada_groups = False
    if not hasattr(args, 'min_groups_per_scale'):
        args.min_groups_per_scale = 1
    if not hasattr(args, 'num_mixture_dec'):
        args.num_mixture_dec = 10
    return args