code: def get_mocked_task(name: str):
      task = mock.Mock()
      task.name = name
      task.postprocess_fn.return_value = ["test"]
      task.get_dataset.return_value = [
          {
              "inputs": tf.constant([111, 222, 333, 444]),
              "negative_inputs": tf.constant(
                  [[111, 222, 333, 444], [111, 222, 333, 444]]
              ),
              "targets": tf.constant([222]),
          }
      ]
      task.mock_vocab = mock.Mock()
      task.mock_vocab.decode_tf.return_value = ["test"]
      task.output_features = {
          "inputs": seqio.dataset_providers.Feature(task.mock_vocab),
          "negative_inputs": seqio.dataset_providers.Feature(
              task.mock_vocab, rank=2
          ),
          "targets": seqio.dataset_providers.Feature(task.mock_vocab),
      }
      return task
  
file_path: text-to-text-transfer-transformer/t5/scripts/dump_task_test.py
imports: from unittest import mock
  from absl.testing import flagsaver
  from absl.testing import parameterized
  import gin
  import seqio
  from t5.scripts import dump_task
  import tensorflow
label_desc: Use image node_id 1 for calling a global function with example usage: get_mocked_task(name) and returns: task