code: def num_cols(x):
      """Returns number of cols in a given `Tensor`."""
      if tf.compat.dimension_value(x.shape[-1]) is not None:
          return tf.compat.dimension_value(x.shape[-1])
      return ps.shape(x)[-1]
  
file_path: probability/tensorflow_probability/python/glm/fisher_scoring.py
imports: import warnings
  import numpy
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import distribution_util
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.math.linalg import sparse_or_dense_matvecmul
label_desc: Use image node_id 6 for calling a global function with example usage: num_cols(x) and returns: ps, tf