code: def _simple_upfirdn_2d(
      x,
      k,
      up=1,
      down=1,
      pad0=0,
      pad1=0,
      data_format="NCHW",
      impl="cuda",
  ):
      assert data_format in ["NCHW", "NHWC"]
      assert x.shape.rank == 4
      y = x
      if data_format == "NCHW":
          y = tf.reshape(y, [-1, _shape(y, 2), _shape(y, 3), 1])
      y = upfirdn_2d(
          y,
          k,
          upx=up,
          upy=up,
          downx=down,
          downy=down,
          padx0=pad0,
          padx1=pad1,
          pady0=pad0,
          pady1=pad1,
          impl=impl,
      )
      if data_format == "NCHW":
          y = tf.reshape(
              y, [-1, _shape(x, 1), _shape(y, 1), _shape(y, 2)]
          )
      return y
  
file_path: insightface/reconstruction/ostec/external/stylegan2/dnnlib/tflib/ops/upfirdn_2d.py
imports: import os
  import numpy
  import tensorflow
  from ..None import custom_ops
label_desc: Use image node_id 12 for calling a global function with example usage: _simple_upfirdn_2d(x, k, up, down, pad0, pad1, data_format, impl) and returns: y