code: def __init__(
      self,
      in_channels,
      out_channels,
      seq_len,
      modes=0,
      mode_select_method="random",
  ):
      super(FourierBlock, self).__init__()
      """
          Fourier block
          """
      # get modes on frequency domain
      self.index = get_frequency_modes(
          seq_len, modes=modes, mode_select_method=mode_select_method
      )
  
      self.scale = 1 / (in_channels * out_channels)
      self.weights1 = nn.Parameter(
          self.scale
          * torch.rand(
              8,
              in_channels // 8,
              out_channels // 8,
              len(self.index),
              dtype=torch.cfloat,
          )
      )
  
imports: import numpy
  from typing import Optional
  import torch
  import torch.nn
  import torch.nn.functional
  from ..common._modules import DataEmbedding
  from ..common._base_windows import BaseWindows
  from ..losses.pytorch import MAE
label_desc: Use image node_id 1 to create a new FourierBlock object from inherited base classes: nn with example: obj = FourierBlock(in_channels, out_channels, seq_len, modes, mode_select_method)