code: def test_TextClassificationHead_class_weights_dimensions():
      with pytest.raises(ValueError):
          class_wights = np.asarray([[0.4, 0.6], [0.8, 0.2]])
          TextClassificationHead(
              num_labels=2, class_weights=class_wights
          )
  
file_path: FARM/test/test_prediction_head.py
imports: import logging
  import numpy
  from pathlib import Path
  import pytest
  from farm.data_handler.data_silo import DataSilo
  from farm.data_handler.processor import TextClassificationProcessor
  from farm.modeling.adaptive_model import AdaptiveModel
  from farm.modeling.language_model import LanguageModel
  from farm.modeling.prediction_head import TextClassificationHead
  from farm.modeling.tokenization import Tokenizer
  from farm.utils import set_all_seeds, initialize_device_settings
label_desc: Use image node_id 2 for calling a global function with example usage: test_TextClassificationHead_class_weights_dimensions() without return types