code: def _generate_conv2d_from_smoothing_kernel(kernel):
      channels = kernel.shape[0]
      kernel_size = kernel.shape[-1]
  
      if _is_even(kernel_size):
          raise NotImplementedError(
              "Even number kernel size not supported yet, kernel_size={}".format(
                  kernel_size
              )
          )
  
      filter_ = nn.Conv2d(
          in_channels=channels,
          out_channels=channels,
          kernel_size=kernel_size,
          groups=channels,
          padding=kernel_size // 2,
          bias=False,
      )
  
      filter_.weight.data = kernel
      filter_.weight.requires_grad = False
      return filter_
  
imports: import math
  import torch
  import torch.nn
  import torch.nn.functional
  from torch.nn.modules.utils import _quadruple
  from .base import Processor
label_desc: Use image node_id 1 for calling a global function with example usage: _generate_conv2d_from_smoothing_kernel(kernel) and returns: filter_