code: def _make_positive_axis(axis, ndims):
      """Rectify possibly negatively axis. Prefer return Python list."""
      axis = _make_list_or_1d_tensor(axis)
  
      ndims = ps.convert_to_shape_tensor(
          ndims, name="ndims", dtype=tf.int32
      )
      ndims_ = tf.get_static_value(ndims)
  
      if _is_list_like(axis) and ndims_ is not None:
          # Static case
          positive_axis = []
          for a in axis:
              if a < 0:
                  a = ndims_ + a
              positive_axis.append(a)
      else:
          # Dynamic case
          axis = tf.convert_to_tensor(axis, name="axis", dtype=tf.int32)
          positive_axis = tf.where(axis >= 0, axis, axis + ndims)
  
      return positive_axis
  
imports: import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import assert_util
  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.internal import tensorshape_util
  from tensorflow_probability.python.math.generic import reduce_logmeanexp
label_desc: Use image node_id 19 for calling a global function with example usage: _make_positive_axis(axis, ndims) and returns: positive_axis