code: def _validate_unique_operation_on_categorical_columns(
      train_data: pd.DataFrame,
      test_data: pd.DataFrame,
      categorical_features: List[str],
  ) -> None:
      """Validate unique operation on categorical columns.
  
      :param train_data: Training data.
      :type train_data: pd.DataFrame
      :param test_data: Test data.
      :type test_data: pd.DataFrame
      :param categorical_features: List of categorical features.
      :type categorical_features: List[str]
      :raises UserConfigValidationException: If unique operation is not
          successful on categorical columns.
      :return: None
      """
      for column in categorical_features:
          try:
              np.unique(train_data[column])
          except Exception:
              raise UserConfigValidationException(
                  f"Error finding unique values in column {column}."
                  " Please check your train data."
              )
  
          try:
              np.unique(test_data[column])
          except Exception:
              raise UserConfigValidationException(
                  f"Error finding unique values in column {column}. "
                  "Please check your test data."
              )
  
imports: from typing import List, Optional
  import numpy
  import pandas
  from raiutils.exceptions import UserConfigValidationException
label_desc: Use image node_id 1 for calling a global function with example usage: _validate_unique_operation_on_categorical_columns(train_data, test_data, categorical_features) without return types