class_docstr: Implementation of the OCR module:
  We aggregate the global object representation to update the representation for each pixel.
code: def __init__(
      self,
      in_channels,
      key_channels,
      out_channels,
      scale=1,
      dropout=0.1,
      bn_type=None,
  ):
      super(SpatialOCR_Module, self).__init__()
      self.object_context_block = ObjectAttentionBlock2D(
          in_channels, key_channels, scale, bn_type
      )
      _in_channels = 2 * in_channels
  
      self.conv_bn_dropout = nn.Sequential(
          nn.Conv2d(
              _in_channels,
              out_channels,
              kernel_size=1,
              padding=0,
              bias=False,
          ),
          ModuleHelper.BNReLU(out_channels, bn_type=bn_type),
          nn.Dropout2d(dropout),
      )
  
imports: import os
  import logging
  import numpy
  import torch
  import torch.nn
  import torch._utils
  import torch.nn.functional
  from .bn_helper import BatchNorm2d, BatchNorm2d_class, relu_inplace
label_desc: Use image node_id 1 to create a new SpatialOCR_Module object from inherited base classes: nn with example: obj = SpatialOCR_Module(in_channels, key_channels, out_channels, scale, dropout, bn_type)