code: def test_pseudorandom_split_on_string_field(all_values):
      split_list = [0.3, 0.4, 0.1, 0.0, 0.2]
      values_num = len(all_values)
      for idx in range(len(split_list)):
          test_predicate = in_pseudorandom_split(
              split_list, idx, "string_partition_field"
          )
          included_values = set()
          for val in all_values:
              if test_predicate.do_include(
                  {"string_partition_field": val}
              ):
                  included_values.add(val)
          expected_num = values_num * split_list[idx]
          assert (
              pytest.approx(len(included_values), expected_num * 0.1)
              == expected_num
          )
  
imports: import pytest
  import numpy
  from pyspark.sql import SparkSession
  from pyspark.sql.types import IntegerType
  from petastorm import make_reader
  from petastorm.codecs import ScalarCodec
  from petastorm.etl.dataset_metadata import materialize_dataset
  from petastorm.predicates import in_set, in_intersection, in_negate, in_reduce, in_pseudorandom_split, in_lambda
  from petastorm.tests.test_common import TestSchema
  from petastorm.unischema import dict_to_spark_row, Unischema, UnischemaField
label_desc: Use image node_id 9 for calling a global function with example usage: test_pseudorandom_split_on_string_field(all_values) without return types