code: def __init__(self):
      super(ParamsGettersSetters, self).__init__()
      for param in self.params:
          param_name = param.name
          fg_attr = "get" + re.sub(
              r"(?:^|_)(.)", lambda m: m.group(1).upper(), param_name
          )
          fs_attr = "set" + re.sub(
              r"(?:^|_)(.)", lambda m: m.group(1).upper(), param_name
          )
          # Generates getter and setter only if not exists
          try:
              getattr(self, fg_attr)
          except AttributeError:
              setattr(self, fg_attr, self.getParamValue(param_name))
          try:
              getattr(self, fs_attr)
          except AttributeError:
              setattr(self, fs_attr, self.setParamValue(param_name))
  
imports: import re
  from pyspark.ml.param import Params
label_desc: Use image node_id 1 to create a new ParamsGettersSetters object from inherited base classes: Params with example: obj = ParamsGettersSetters()