code: def convert_line_to_dict(line: str, vocab: dict, name: str) -> Dict:
      tokens: List = line.strip().split()
      out: Dict = {
          "name": name,
          "shape": [len(tokens), len(vocab) + 2],
          "token": " ".join(tokens),
          "tokenid": " ".join(
              [
                  str(vocab[t]) if t in vocab else str(vocab["<unk>"])
                  for t in tokens
              ]
          ),
      }
      return out
  
file_path: espnet/egs/iwslt16/mt1/local/generate_json.py
imports: import argparse
  import json
  import os
  from logging import getLogger
  from typing import Dict, List
label_desc: Use image node_id 3 for calling a global function with example usage: convert_line_to_dict(line, vocab, name) and returns: out