code: def _kron_tf(a, b):
      import tensorflow as tf
  
      a_shape = a.shape
      b_shape = b.shape
  
      if len(a_shape) == 1:
          a = a[:, tf.newaxis]
          b = b[tf.newaxis, :]
          return tf.reshape(a * b, (a_shape[0] * b_shape[0],))
  
      a = a[:, tf.newaxis, :, tf.newaxis]
      b = b[tf.newaxis, :, tf.newaxis, :]
      return tf.reshape(
          a * b, (a_shape[0] * b_shape[0], a_shape[1] * b_shape[1])
      )
  
imports: from importlib import import_module
  import autoray
  import numpy
  import semantic_version
  from scipy.linalg import block_diag
  from .utils import get_deep_interface
label_desc: Use image node_id 23 for calling a global function with example usage: _kron_tf(a, b) and returns: tf, tf