code: def concat_or_stack(tensors, axis=0):
      try:
          return tf.concat(tensors, axis=axis)
      except ValueError:
          # tensors are scalars
          return tf.stack(tensors, axis=axis)
  
imports: import tensorflow
label_desc: Use image node_id 2 for calling a global function with example usage: concat_or_stack(tensors, axis) and returns: tf, tf