<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def create_optimizer_config(args: argparse.Namespace, source_vocab_sizes: List[int], extra_initializers: List[Tuple[str, mx.initializer.Initializer]] = None) -> OptimizerConfig: """ Returns an OptimizerConfig. :param args: Arguments as returned by argparse. :param source_vocab_sizes: Source vocabulary sizes. :param extra_initializers: extra initializer to pass to `get_initializer`. :return: The optimizer type and its parameters as well as the kvstore. """

    optimizer_params = {'wd': args.weight_decay,
                        "learning_rate": args.initial_learning_rate}

    gradient_clipping_threshold = none_if_negative(args.gradient_clipping_threshold)
    if gradient_clipping_threshold is None:
        logger.info("Gradient clipping threshold set to negative value. Will not perform gradient clipping.")
        gradient_clipping_type = C.GRADIENT_CLIPPING_TYPE_NONE
    else:
        gradient_clipping_type = args.gradient_clipping_type

    effective_batch_size = args.batch_size * args.update_interval

    # Note: for 'abs' we use the implementation inside of MXNet's optimizer and 'norm_*' we implement ourselves
    # inside the TrainingModel.
    if gradient_clipping_threshold is not None and gradient_clipping_type == C.GRADIENT_CLIPPING_TYPE_ABS:
        optimizer_params["clip_gradient"] = gradient_clipping_threshold
    if args.momentum is not None:
        optimizer_params["momentum"] = args.momentum
    if args.loss_normalization_type == C.LOSS_NORM_VALID:
        # When we normalize by the number of non-PAD symbols in a batch we need to disable rescale_grad.
        optimizer_params["rescale_grad"] = 1.0 / args.update_interval
    elif args.loss_normalization_type == C.LOSS_NORM_BATCH:
        # Making MXNet module API's default scaling factor explicit
        optimizer_params["rescale_grad"] = 1.0 / effective_batch_size
    # Manually specified params
    if args.optimizer_params:
        optimizer_params.update(args.optimizer_params)

    weight_init = initializer.get_initializer(default_init_type=args.weight_init,
                                              default_init_scale=args.weight_init_scale,
                                              default_init_xavier_rand_type=args.weight_init_xavier_rand_type,
                                              default_init_xavier_factor_type=args.weight_init_xavier_factor_type,
                                              embed_init_type=args.embed_weight_init,
                                              embed_init_sigma=source_vocab_sizes[0] ** -0.5,
                                              rnn_init_type=args.rnn_h2h_init,
                                              extra_initializers=extra_initializers)

    lr_sched = lr_scheduler.get_lr_scheduler(args.learning_rate_scheduler_type,
                                             args.checkpoint_interval,
                                             none_if_negative(args.learning_rate_half_life),
                                             args.learning_rate_reduce_factor,
                                             args.learning_rate_reduce_num_not_improved,
                                             args.learning_rate_schedule,
                                             args.learning_rate_warmup)

    config = OptimizerConfig(name=args.optimizer,
                             params=optimizer_params,
                             kvstore=args.kvstore,
                             initializer=weight_init,
                             gradient_clipping_type=gradient_clipping_type,
                             gradient_clipping_threshold=gradient_clipping_threshold,
                             update_interval=args.update_interval)
    config.set_lr_scheduler(lr_sched)
    logger.info("Optimizer: %s", config)
    logger.info("Gradient Compression: %s", gradient_compression_params(args))
    if args.update_interval > 1:
        logger.info("Gradient accumulation over %d batches. Effective batch size: %d",
                    args.update_interval, effective_batch_size)
    return config