docstr: Ensure the provided column is present in the dataset.
  
  :param column_purpose: The purpose the column fulfills in the dataset.
  :type column_purpose: str
  :param column_names: List of column names to validate.
  :type column_names: List[str]
  :param feature_names: List of features in the input dataset.
  :type feature_names: List[str]
docstr_tok: ["Ensure","the","provided","column","is","present","in","the","dataset",".",":","param","column_purpose",":","The","purpose","the","column","fulfills","in","the","dataset",".",":","type","column_purpose",":","str",":","param","column_names",":","List","of","column","names","to","validate",".",":","type","column_names",":","List","[","str","]",":","param","feature_names",":","List","of","features","in","the","input","dataset",".",":","type","feature_names",":","List","[","str","]"]
code: def _validate_columns(
      column_purpose: str,
      column_names: List[str],
      feature_names: List[str],
  ):
      """Ensure the provided column is present in the dataset.
  
      :param column_purpose: The purpose the column fulfills in the dataset.
      :type column_purpose: str
      :param column_names: List of column names to validate.
      :type column_names: List[str]
      :param feature_names: List of features in the input dataset.
      :type feature_names: List[str]
      """
      if column_names is None:
          return
      feature_name_set = set(feature_names)
      for column_name in column_names:
          if column_name not in feature_name_set:
              raise UserConfigValidationException(
                  f"The given {column_purpose} {column_name} is not present "
                  f'in the provided features: {", ".join(feature_names)}.'
              )
  
file_path: responsible-ai-toolbox/responsibleai/responsibleai/feature_metadata.py
imports: from typing import Any, Dict, List, Optional
  from raiutils.exceptions import UserConfigValidationException
label_desc: Use image node_id 6 for calling the FeatureMetadata obj's underlying member method code with example usage: obj._validate_columns(column_purpose, column_names, feature_names) without return types