code: def test_pytorch_dataloader_with_transform_function(
      synthetic_dataset,
  ):
      with DataLoader(
          make_reader(
              synthetic_dataset.url,
              schema_fields=ALL_FIELDS - NULLABLE_FIELDS,
              reader_pool_type="dummy",
              transform_spec=TransformSpec(_str_to_int),
          ),
          collate_fn=_noop_collate,
      ) as loader:
          for item in loader:
              assert len(item) == 1
  
file_path: petastorm/petastorm/tests/test_pytorch_utils.py
imports: from __future__ import division
  import numpy
  from petastorm import make_reader, TransformSpec
  from petastorm.pytorch import DataLoader
  from petastorm.tests.test_common import TestSchema
label_desc: Use image node_id 4 for calling a global function with example usage: test_pytorch_dataloader_with_transform_function(synthetic_dataset) without return types