code: def _str_to_int(sample):
      for k, v in sample.items():
          if (
              v is not None
              and isinstance(v, np.ndarray)
              and v.dtype.type in (np.string_, np.unicode_)
          ):
              sample[k] = np.zeros_like(v, dtype=np.int8)
      return sample
  
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 2 for calling a global function with example usage: _str_to_int(sample) and returns: sample