code: def preprocess(id: str, data):
      new_data = {}
      for k, v in data.items():
          if isinstance(v, str):
              if v == "hello world":
                  new_data[k] = np.array([0])
              elif v == "foo bar":
                  new_data[k] = np.array([1])
              else:
                  new_data[k] = np.array([2])
          else:
              new_data[k] = v
      return new_data
  
imports: import h5py
  import kaldiio
  import numpy
  import pytest
  from espnet2.fileio.npy_scp import NpyScpWriter
  from espnet2.fileio.sound_scp import SoundScpWriter
  from espnet2.train.iterable_dataset import IterableESPnetDataset
label_desc: Use image node_id 1 for calling a global function with example usage: preprocess(id, data) and returns: new_data