code: def _test_basic_cases(
      self,
      constructor,
      scheduler_constructors=None,
      ignore_multidevice=False,
  ):
      if scheduler_constructors is None:
          scheduler_constructors = []
      self._test_state_dict(
          torch.randn(10, 5),
          torch.randn(10),
          torch.randn(5),
          constructor,
      )
      self._test_basic_cases_template(
          torch.randn(10, 5),
          torch.randn(10),
          torch.randn(5),
          constructor,
          scheduler_constructors,
      )
      # non-contiguous parameters
      self._test_basic_cases_template(
          torch.randn(10, 5, 2)[..., 0],
          torch.randn(10, 2)[..., 0],
          torch.randn(5),
          constructor,
          scheduler_constructors,
      )
      # CUDA
      if not torch.cuda.is_available():
          return
      self._test_basic_cases_template(
          torch.randn(10, 5).cuda(),
          torch.randn(10).cuda(),
          torch.randn(5).cuda(),
          constructor,
          scheduler_constructors,
      )
      # Multi-GPU
      if not torch.cuda.device_count() > 1 or ignore_multidevice:
          return
      self._test_basic_cases_template(
          torch.randn(10, 5).cuda(0),
          torch.randn(10).cuda(1),
          torch.randn(5).cuda(0),
          constructor,
          scheduler_constructors,
      )
  
file_path: pytorch-optimizer/tests/test_optimizer.py
imports: import functools
  from copy import deepcopy
  import torch
  from torch.autograd import Variable
  from torch.optim.lr_scheduler import ExponentialLR, ReduceLROnPlateau, StepLR
  import torch_optimizer
label_desc: Use image node_id 3 for calling the TestOptim obj's underlying member method code with example usage: obj._test_basic_cases(constructor, scheduler_constructors, ignore_multidevice) without return types