code: def create_tf_config(cluster_spec, task_type, task_index):
      return {
          "cluster": cluster_spec,
          "task": {"type": task_type, "index": task_index},
      }
  
file_path: TensorLayer/tensorlayer/cli/train.py
imports: import argparse
  import json
  import multiprocessing
  import os
  import platform
  import re
  import subprocess
  import sys
label_desc: Use image node_id 2 for calling a global function with example usage: create_tf_config(cluster_spec, task_type, task_index) and returns: dict