code: def test_set_metadata(text_classification_dataset_mock):
      # Arrange
      dataset = text_classification_dataset_mock
      metadata = pd.DataFrame({"first": [1, 2, 3], "second": [4, 5, 6]})
  
      assert_that(dataset._metadata, equal_to(None))
      assert_that(dataset._cat_metadata, equal_to(None))
  
      # Act
      dataset.set_metadata(metadata, categorical_metadata=[])
  
      # Assert
      assert_that(
          (dataset.metadata != metadata).sum().sum(), equal_to(0)
      )
      assert_that(dataset.categorical_metadata, equal_to([]))
  
imports: import numpy
  import pandas
  from hamcrest import assert_that, calling, contains_exactly, equal_to, raises
  from deepchecks.core.errors import DeepchecksValueError
  from deepchecks.nlp.text_data import TextData
label_desc: Use image node_id 12 for calling a global function with example usage: test_set_metadata(text_classification_dataset_mock) without return types