code: def filename_to_task_id(fname):
      """Map filename to the task id that created it assuming 1k tasks."""
      # This matches the order and size in WikisumBase.out_filepaths
      fname = os.path.basename(fname)
      shard_id_increment = {
          "train": 0,
          "dev": 800,
          "test": 900,
      }
      parts = fname.split("-")
      split = parts[1]
      shard_id = parts[2]
      task_id = int(shard_id) + shard_id_increment[split]
      return task_id
  
file_path: tensor2tensor/tensor2tensor/data_generators/wikisum/validate_data.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import json
  import os
  import numpy
  import six
  from six.moves import zip
  from tensor2tensor.data_generators.wikisum import wikisum
  import tensorflow.compat.v1
label_desc: Use image node_id 2 for calling a global function with example usage: filename_to_task_id(fname) and returns: task_id