code: def _check_params(self, swa_start, swa_freq):
      params = [swa_start, swa_freq]
      params_none = [param is None for param in params]
      if not all(params_none) and any(params_none):
          warnings.warn(
              "Some of swa_start, swa_freq is None, ignoring other"
          )
      for i, param in enumerate(params):
          if param is not None and not isinstance(param, int):
              params[i] = int(param)
              warnings.warn("Casting swa_start, swa_freq to int")
      return not any(params_none), params
  
imports: import warnings
  from collections import defaultdict
  from typing import Optional, Union
  import torch
  from pytext.config.component import create_optimizer
  from pytext.optimizer.lamb import Lamb
  from pytext.optimizer.madgrad import MADGRAD
  from pytext.optimizer.optimizers import Adagrad, Adam, AdamW, Optimizer, SGD
  from pytext.optimizer.radam import RAdam
  from torch.optim import Optimizer
label_desc: Use image node_id 2 for calling the StochasticWeightAveraging obj's underlying member method code with example usage: obj._check_params(swa_start, swa_freq) and returns: unknown,  params