code: def summary_joint_nlu_data(fname, output_file_path):
      with open(fname, "rb") as stream:
          ds, dicts = pickle.load(stream)
      logging.info("      samples: {:4d}".format(len(ds["query"])))
      logging.info(
          "   vocab_size: {:4d}".format(len(dicts["token_ids"]))
      )
      logging.info(
          "   slot count: {:4d}".format(len(dicts["slot_ids"]))
      )
      logging.info(
          " intent count: {:4d}".format(len(dicts["intent_ids"]))
      )
  
      t2i, s2i, in2i = map(
          dicts.get, ["token_ids", "slot_ids", "intent_ids"]
      )
      i2t, i2s, i2in = map(
          lambda d: {d[k]: k for k in d.keys()}, [t2i, s2i, in2i]
      )
      query, slots, intent = map(
          ds.get, ["query", "slot_labels", "intent_labels"]
      )
  
      with open(output_file_path, "w", encoding="utf-8") as out_file:
          for i in range(len(query)):
              out_file.write(i2in[intent[i][0]] + "\t")
              out_file.write(" ".join(map(i2s.get, slots[i])) + "\t")
              out_file.write(" ".join(map(i2t.get, query[i])) + "\n")
  
file_path: delta/delta/data/datasets/utils.py
imports: import os
  import pickle
  import numpy
  from pathlib import Path
  import tempfile
  from absl import logging
  from sklearn.model_selection import train_test_split
label_desc: Use image node_id 4 for calling a global function with example usage: summary_joint_nlu_data(fname, output_file_path) without return types