code: def _get_dim(x, idx):
      if x.shape.ndims is None:
          return tf.shape(x)[idx]
      return x.shape[idx] or tf.shape(x)[idx]
  
file_path: addons/tensorflow_addons/image/dense_image_warp.py
imports: import tensorflow
  from tensorflow_addons.utils import types
  from typing import Optional
label_desc: Use image node_id 4 for calling a global function with example usage: _get_dim(x, idx) and returns: unknown, tf