code: def dict_to_namedtuple(dict_instance):
      NamedTuple = namedtuple("NamedTuple", dict_instance.keys())
      return NamedTuple._make(dict_instance.values())
  
imports: from typing import Text, Tuple, Union
  import tensorflow
  import argparse
  import tensorflow.compat.v1
  from enum import Enum
  from collections import namedtuple
  from tensorflow.python.eager import tape
  from tensorflow.python.tpu import tpu_function
label_desc: Use image node_id 1 for calling a global function with example usage: dict_to_namedtuple(dict_instance) and returns: NamedTuple