code: def test_sample_for_property():
      s = "all the single ladies. all the single ladies? now put your hands up."
      sample_words = _sample_for_property(
          text=s, mode="words", limit=2, random_seed=42
      )
      sample_sentences = _sample_for_property(
          text=s, mode="sentences", limit=2, random_seed=42
      )
  
      assert_that(sample_words, equal_to("hands put"))
      assert_that(
          sample_sentences,
          equal_to("all the single ladies. all the single ladies?"),
      )
  
imports: import os
  import pathlib
  import timeit
  import uuid
  import numpy
  import pytest
  from hamcrest import *
  from deepchecks.core.errors import DeepchecksValueError
  from deepchecks.nlp.utils.text_properties import TOXICITY_MODEL_NAME_ONNX, _sample_for_property, calculate_builtin_properties, english_text
  from deepchecks.nlp.utils.text_properties_models import MODELS_STORAGE, _get_transformer_model_and_tokenizer
label_desc: Use image node_id 31 for calling a global function with example usage: test_sample_for_property() without return types