class_docstr: An algorithm hyperparameter with optional validation.
  
  Implemented as a python descriptor object.
class_docstr_tok: ["An","algorithm","hyperparameter","with","optional","validation",".","Implemented","as","a","python","descriptor","object","."]
docstr: Placeholder docstring
docstr_tok: ["Placeholder","docstring"]
code: def validate(self, value):
      """Placeholder docstring"""
      if (
          value is None
      ):  # We allow assignment from None, but Nones are not sent to training.
          return
  
      for valid in self.validation:
          if not valid(value):
              error_message = (
                  "Invalid hyperparameter value {} for {}".format(
                      value, self.name
                  )
              )
              if self.validation_message:
                  error_message = (
                      error_message
                      + ". Expecting: "
                      + self.validation_message
                  )
              raise ValueError(error_message)
  
file_path: sagemaker-python-sdk/src/sagemaker/amazon/hyperparameter.py
imports: from __future__ import absolute_import
  import json
  from sagemaker.workflow import is_pipeline_variable
label_desc: Use image node_id 2 for calling the Hyperparameter obj's underlying member method code with example usage: obj.validate(value) without return types