code: def smart_concat(v1, v2):
      if isinstance(v1, tf.Tensor) or isinstance(v2, tf.Tensor):
          return tf.concat([v1, v2], 0)
      else:
          return v1 + v2
  
imports: from typing import Optional, Sequence, Union
  import numpy
  from sonnet.src import base
  from sonnet.src import initializers
  from sonnet.src import once
  from sonnet.src import types
  from sonnet.src import utils
  import tensorflow
label_desc: Use image node_id 1 for calling a global function with example usage: smart_concat(v1, v2) and returns: tf, unknown