code: def local_flatten(x, kernel_size, name=None):
      if isinstance(kernel_size, int):
          kernel_size = (kernel_size, kernel_size)
      assert isinstance(kernel_size, tuple)
      x = [
          [
              tf.strided_slice(
                  x, (0, i, j), tf.shape(x)[:-1], (1,) + kernel_size
              )
              for j in range(kernel_size[1])
          ]
          for i in range(kernel_size[0])
      ]
      return tf.concat(
          reduce(lambda x, y: x + y, x), axis=-1, name=name
      )
  
file_path: tensornets/tensornets/ops.py
imports: from __future__ import absolute_import
  import os
  import tensorflow
  from .utils import ops_to_outputs
  from .version_utils import tf_later_than
label_desc: Use image node_id 5 for calling a global function with example usage: local_flatten(x, kernel_size, name) and returns: tf