code: def validate(cls, key):
      if key not in cls.all():
          raise ValueError(
              f'Invalid Reduction Key: {key}. Expected keys are "{cls.all()}"'
          )
  
label_desc: Use image node_id 2 for calling the Reduction obj's underlying member method code with example usage: obj.validate(cls, key) without return types