code: def test_not_enough_samples(tweet_emotion_train_test_textdata):
      # Arrange
      _, test = tweet_emotion_train_test_textdata
      text_data = test.sample(5)
      text_data.label[0] = np.nan
      text_data.label[3] = None
  
      # Act & Assert
      property_check = UnderAnnotatedPropertySegments(
          segment_minimum_size_ratio=0.04
      )
      metadata_check = UnderAnnotatedMetaDataSegments(
          segment_minimum_size_ratio=0.04
      )
      assert_that(
          calling(property_check.run).with_args(text_data),
          raises(
              NotEnoughSamplesError,
              "Not enough samples to calculate under annotated properties segments. Minimum 10 samples required.",
          ),
      )
      assert_that(
          calling(metadata_check.run).with_args(text_data),
          raises(
              NotEnoughSamplesError,
              "Not enough samples to calculate under annotated metadata segments. Minimum 10 samples required.",
          ),
      )
  
file_path: deepchecks/tests/nlp/checks/data_integrity/under_annotated_segments_test.py
imports: import numpy
  from hamcrest import assert_that, calling, close_to, equal_to, has_items, raises
  from deepchecks.core.errors import NotEnoughSamplesError
  from deepchecks.nlp.checks import UnderAnnotatedMetaDataSegments, UnderAnnotatedPropertySegments
  from tests.base.utils import equal_condition_result
label_desc: Use image node_id 7 for calling a global function with example usage: test_not_enough_samples(tweet_emotion_train_test_textdata) without return types