code: def topk_watch_fn(feeds, fetches):
      """TFDBG watch function for transformer beam search nodes.
  
      Args:
        feeds: Unused. Required by tfdbg.
        fetches: Unused. Required by tfdbg.
  
      Returns:
        a WatchOptions instance that will capture all beam search ops.
      """
      del fetches, feeds
      return tfdbg.WatchOptions(
          node_name_regex_whitelist=".*grow_(finished|alive)_(topk_scores|topk_seq).*",
          debug_ops=["DebugIdentity"],
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from collections import deque
  import glob
  import os
  import shutil
  import time
  import numpy
  from six.moves import range
  from tensor2tensor.bin import t2t_trainer
  from tensor2tensor.data_generators import text_encoder
  from tensor2tensor.insights import graph
  from tensor2tensor.insights import query_processor
  from tensor2tensor.utils import decoding
  from tensor2tensor.utils import trainer_lib
  from tensor2tensor.utils import usr_dir
  import tensorflow.compat.v1
  from tensorflow.python import debug
label_desc: Use image node_id 1 for calling a global function with example usage: topk_watch_fn(feeds, fetches) and returns: tfdbg