code: def __init__(
      self,
      harmonics: int,
      backcast_size: int,
      forecast_size: int,
      out_features: int = 1,
  ):
      super().__init__()
      self.out_features = out_features
      frequency = np.append(
          np.zeros(1, dtype=float),
          np.arange(
              harmonics, harmonics / 2 * forecast_size, dtype=float
          )
          / harmonics,
      )[None, :]
      backcast_grid = (
          -2
          * np.pi
          * (
              np.arange(backcast_size, dtype=float)[:, None]
              / forecast_size
          )
          * frequency
      )
      forecast_grid = (
          2
          * np.pi
          * (
              np.arange(forecast_size, dtype=float)[:, None]
              / forecast_size
          )
          * frequency
      )
  
      backcast_cos_template = torch.tensor(
          np.transpose(np.cos(backcast_grid)), dtype=torch.float32
      )
      backcast_sin_template = torch.tensor(
          np.transpose(np.sin(backcast_grid)), dtype=torch.float32
      )
      backcast_template = torch.cat(
          [backcast_cos_template, backcast_sin_template], dim=0
      )
  
      forecast_cos_template = torch.tensor(
          np.transpose(np.cos(forecast_grid)), dtype=torch.float32
      )
      forecast_sin_template = torch.tensor(
          np.transpose(np.sin(forecast_grid)), dtype=torch.float32
      )
      forecast_template = torch.cat(
          [forecast_cos_template, forecast_sin_template], dim=0
      )
  
      self.backcast_basis = nn.Parameter(
          backcast_template, requires_grad=False
      )
      self.forecast_basis = nn.Parameter(
          forecast_template, requires_grad=False
      )
  
imports: from typing import Tuple, Optional
  import numpy
  import torch
  import torch.nn
  from ..losses.pytorch import MAE
  from ..common._base_windows import BaseWindows
label_desc: Use image node_id 1 to create a new SeasonalityBasis object from inherited base classes: nn with example: obj = SeasonalityBasis(harmonics, backcast_size, forecast_size, out_features)