code: def infer_tf_dtypes(image_array):
      """
      Choosing a suitable tf dtype based on the dtype of input numpy array.
      """
      return dtype_casting(
          image_array.dtype[0], image_array.interp_order[0], as_tf=True
      )
  
imports: from __future__ import absolute_import, division, print_function
  from copy import deepcopy
  import argparse
  import numpy
  import pandas
  import tensorflow
  from six import string_types
  from niftynet.io.misc_io import dtype_casting
  from niftynet.io.image_sets_partitioner import COLUMN_UNIQ_ID
  from niftynet.io.image_type import ImageFactory
  from niftynet.layer.base_layer import Layer, DataDependentLayer, RandomisedLayer
  from niftynet.utilities.user_parameters_helper import make_input_tuple
  from niftynet.utilities.util_common import print_progress_bar, ParserNamespace
  from niftynet.io.image_sets_partitioner import ImageSetsPartitioner
  from niftynet.utilities.util_common import look_up_operations
label_desc: Use image node_id 1 for calling a global function with example usage: infer_tf_dtypes(image_array) and returns: dtype_casting