code: def distance_manhattenword(
      train_fname=traindna,
      test_fname=testdna,
      order=3,
      gap=0,
      reverse=False,
  ):
      charfeat = sg.create_string_features(
          sg.read_csv(train_fname), sg.DNA
      )
      feats_train = sg.create_string_features(
          charfeat, order - 1, order, gap, reverse
      )
      preproc = sg.create_transformer("SortWordString")
      preproc.fit(feats_train)
      feats_train = preproc.transform(feats_train)
  
      charfeat = sg.create_string_features(
          sg.read_csv(test_fname), sg.DNA
      )
      feats_test = sg.create_string_features(
          charfeat, order - 1, order, gap, reverse
      )
      feats_test = preproc.transform(feats_test)
  
      distance = sg.create_distance("ManhattanWordDistance")
      distance.init(feats_train, feats_train)
  
      dm_train = distance.get_distance_matrix()
      distance.init(feats_train, feats_test)
      dm_test = distance.get_distance_matrix()
      return dm_train, dm_test
  
label_desc: Use image node_id 1 for calling a global function with example usage: distance_manhattenword(train_fname, test_fname, order, gap, reverse) and returns: dm_train,  dm_test