code: def validate_class_args(self, **kwargs):
      if "optimize_mode" in kwargs:
          assert kwargs["optimize_mode"] in [
              "maximize",
              "minimize",
          ], "optimize_mode {} is invalid!".format(
              kwargs["optimize_mode"]
          )
  
file_path: nni/examples/tuners/customized_tuner/demo_tuner/demo_tuner.py
imports: import random
  import numpy
  from nni.tuner import Tuner
  from nni.utils import ClassArgsValidator
label_desc: Use image node_id 1 for calling the MyClassArgsValidator obj's underlying member method code with example usage: obj.validate_class_args() without return types