code: def conv3d(
      input_tensor,
      output_dim,
      kernel_size=(3, 3, 3),
      stride_size=(2, 2, 2),
      initializer_std=0.02,
      name="conv3d",
      backend="tf",
      padding="SAME",
      with_w=False,
  ):
      with tf.variable_scope(name):
          w = tf.get_variable(
              "w",
              list(kernel_size)
              + [input_tensor.get_shape()[-1], output_dim],
              initializer=tf.contrib.layers.xavier_initializer(),
          )
  
          if padding == "Other":
              # GAN-Specific Setting. Consider removal.
              padding = "VALID"
              input_tensor = tf.pad(
                  input_tensor,
                  [[0, 0], [3, 3], [3, 3], [3, 3], [0, 0]],
                  "CONSTANT",
              )
  
          elif padding == "VALID":
              padding = "VALID"
  
          conv = tf.nn.conv3d(
              input_tensor,
              w,
              strides=[1] + list(stride_size) + [1],
              padding=padding,
          )
          biases = tf.get_variable(
              "biases",
              [output_dim],
              initializer=tf.constant_initializer(0.0),
          )
          conv = tf.nn.bias_add(conv, biases)
  
          if with_w:
              return conv, w, biases
          else:
              return conv
  
imports: import tensorflow
label_desc: Use image node_id 2 for calling a global function with example usage: conv3d(input_tensor, output_dim, kernel_size, stride_size, initializer_std, name, backend, padding, with_w) and returns: conv,  w,  biases, conv