code: def test_add_errors_on_invalid_input_advanced(self, adult_data):
      (
          train_df,
          test_df,
          categorical_cols,
          target_col,
          classes,
      ) = adult_data
  
      # train and test not specified
      with pytest.raises(ValueError):
          manager = DataBalanceManager(
              train=None,
              test=None,
              target_column=target_col,
              classes=classes,
              task_type=TaskType.CLASSIFICATION,
          )
          manager.add(cols_of_interest=categorical_cols)
  
      # task_type is not classification
      with pytest.raises(ValueError):
          manager = DataBalanceManager(
              train=train_df,
              test=test_df,
              target_column=target_col,
              classes=classes,
              task_type=TaskType.REGRESSION,
          )
          manager.add(cols_of_interest=categorical_cols)
  
imports: import pandas
  import pytest
  from pandas.testing import assert_frame_equal
  from responsibleai._interfaces import TaskType
  from responsibleai.databalanceanalysis.data_balance_utils import AGGREGATE_BALANCE_MEASURES_KEY, DISTRIBUTION_BALANCE_MEASURES_KEY, FEATURE_BALANCE_MEASURES_KEY
  from responsibleai.managers.data_balance_manager import DataBalanceManager
  from responsibleai.rai_insights.rai_insights import RAIInsights
label_desc: Use image node_id 4 for calling the TestDataBalanceManager obj's underlying member method code with example usage: obj.test_add_errors_on_invalid_input_advanced(adult_data) without return types