code: def get_ndims(image):
      return image.get_shape().ndims or tf.rank(image)
  
file_path: addons/tensorflow_addons/image/utils.py
imports: import tensorflow
label_desc: Use image node_id 1 for calling a global function with example usage: get_ndims(image) and returns: unknown