code: def dump_tensor(model, tensors, input_file, output_file):
      """Dumps the given tensors of a model in .npz format."""
      if not output_file:
          output_file = input_file + ".npz"
      # Note: if receiver-side tensors are requested, this is no problem, as the
      # metagraph contains the union of the sender and receiver graphs.
      sender = instantiate_model_signature(
          model, "sender", outputs=tensors
      )
      input_image = read_png(input_file)
      # Replace special characters in tensor names with underscores.
      table = str.maketrans(r"^./-:", r"_____")
      tensors = [t.translate(table) for t in tensors]
      values = [t.numpy() for t in sender(input_image)]
      assert len(tensors) == len(values)
      # Write to buffer first, since GFile might not be random accessible.
      with io.BytesIO() as buf:
          np.savez(buf, **dict(zip(tensors, values)))
          with tf.io.gfile.GFile(output_file, mode="wb") as f:
              f.write(buf.getvalue())
  
imports: import argparse
  import io
  import os
  import sys
  import urllib
  from absl import app
  from absl.flags import argparse_flags
  import numpy
  import tensorflow
  import tensorflow_compression
label_desc: Use image node_id 10 for calling a global function with example usage: dump_tensor(model, tensors, input_file, output_file) without return types