code: def __setattr__(cls, name, value):
      # Protect property fields from being mutated.
      if name in ("_valid_params", "_is_mandatory_param"):
          raise ValueError(
              "Metric's `{}` shouldn't be modified or deleted.".format(
                  name
              )
          )
      type.__setattr__(cls, name, value)
  
imports: from functools import partial
  import numpy
  from .None import _catboost
label_desc: Use image node_id 4 for calling the _MetricGenerator obj's underlying member method code with example usage: obj.__setattr__(cls, name, value) without return types