class_docstr: This class defines a simple convolution with an optional bias term.
  Please consider ``ConvolutionalLayer`` if batch_norm and activation
  are also used.
code: def layer_op(self, input_tensor):
      input_shape = input_tensor.shape.as_list()
      n_input_chns = input_shape[-1]
      spatial_rank = layer_util.infer_spatial_rank(input_tensor)
  
      # initialize conv kernels/strides and then apply
      w_full_size = layer_util.expand_spatial_params(
          self.kernel_size, spatial_rank
      )
      # expand kernel size to include number of features
      w_full_size = w_full_size + (n_input_chns, self.n_output_chns)
      full_stride = layer_util.expand_spatial_params(
          self.stride, spatial_rank
      )
      full_dilation = layer_util.expand_spatial_params(
          self.dilation, spatial_rank
      )
  
      conv_kernel = tf.get_variable(
          "w",
          shape=w_full_size,
          initializer=self.initializers["w"],
          regularizer=self.regularizers["w"],
      )
      if self.padding in ("VALID", "SAME"):
          output_tensor = tf.nn.convolution(
              input=input_tensor,
              filter=conv_kernel,
              strides=full_stride,
              dilation_rate=full_dilation,
              padding=self.padding,
              name="conv",
          )
      else:
          output_tensor = _extended_convolution(
              input_tensor,
              conv_kernel,
              full_stride,
              full_dilation,
              self.padding,
              constant=self.padding_constant,
          )
  
      if not self.with_bias:
          return output_tensor
  
      # adding the bias term
      bias_term = tf.get_variable(
          "b",
          shape=self.n_output_chns,
          initializer=self.initializers["b"],
          regularizer=self.regularizers["b"],
      )
      output_tensor = tf.nn.bias_add(
          output_tensor, bias_term, name="add_bias"
      )
      return output_tensor
  
imports: from __future__ import absolute_import, print_function
  import math
  import numpy
  import tensorflow
  from niftynet.layer import layer_util
  from niftynet.layer.activation import ActiLayer
  from niftynet.layer.base_layer import TrainableLayer
  from niftynet.layer.bn import BNLayer, InstanceNormLayer
  from niftynet.layer.gn import GNLayer
  from niftynet.utilities.util_common import look_up_operations
label_desc: Use image node_id 2 for calling the ConvLayer obj's underlying member method code with example usage: obj.layer_op(input_tensor) and returns: output_tensor, output_tensor