code: def dimension_size(x, axis):
      """Returns the size of a specific dimension."""
      # Since tf.gather isn't "constant-in, constant-out", we must first check the
      # static shape or fallback to dynamic shape.
      s = tensor_shape.dimension_value(
          x.shape.with_rank_at_least(np.abs(axis))[axis]
      )
      if s is not None:
          return s
      return array_ops.shape(x)[axis]
  
imports: import functools
  import hashlib
  import numpy
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.framework import tensor_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import array_ops_stack
  from tensorflow.python.ops import check_ops
  from tensorflow.python.ops import cond
  from tensorflow.python.ops import control_flow_ops
  from tensorflow.python.ops import linalg_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import nn
  from tensorflow.python.util import tf_inspect
label_desc: Use image node_id 29 for calling a global function with example usage: dimension_size(x, axis) and returns: array_ops, s