code: def _param_type_and_shape(sample_coords, input_size):
      # sample_coords = tf.cast(sample_coords, COORDINATES_TYPE)
      try:
          # if input_size is a numpy array
          input_size = tf.constant(
              input_size, dtype=sample_coords.dtype
          )
      except (TypeError, AttributeError):
          pass
      try:
          # if input_size is a TF Tensor
          input_size = tf.cast(input_size, dtype=sample_coords.dtype)
      except (TypeError, AttributeError):
          pass
      return sample_coords, input_size
  
file_path: NiftyNet/niftynet/layer/resampler.py
imports: from __future__ import absolute_import, division, print_function
  import tensorflow
  from niftynet.layer.base_layer import Layer
  from niftynet.layer.layer_util import infer_spatial_rank
  from niftynet.utilities.util_common import look_up_operations
label_desc: Use image node_id 4 for calling a global function with example usage: _param_type_and_shape(sample_coords, input_size) and returns: sample_coords,  input_size