code: def _init_net(self, ds: EncodedDs):
      self.net_class = (
          DefaultNet if self.net_name == "DefaultNet" else ArNet
      )
  
      X, Y = ds[0]
      net_kwargs = {
          "input_size": len(X),
          "output_size": len(Y),
          "num_hidden": self.num_hidden,
          "dropout": 0,
      }
  
      if self.net_class == ArNet:
          net_kwargs["encoder_span"] = ds.encoder_spans
          net_kwargs["target_name"] = self.target
  
      self.model = self.net_class(**net_kwargs)
  
imports: import time
  from copy import deepcopy
  from collections import deque
  from typing import Dict, List, Optional
  import torch
  import numpy
  import pandas
  from torch import nn
  import torch_optimizer
  from sklearn.metrics import r2_score
  from torch.cuda.amp import GradScaler
  from torch.utils.data import DataLoader
  from torch.nn.modules.loss import MSELoss
  from torch.optim.optimizer import Optimizer
  from type_infer.dtype import dtype
  from lightwood.helpers.log import log
  from lightwood.encoder.base import BaseEncoder
  from lightwood.helpers.torch import LightwoodAutocast
  from lightwood.data.encoded_ds import EncodedDs
  from lightwood.mixer.base import BaseMixer
  from lightwood.mixer.helpers.ar_net import ArNet
  from lightwood.mixer.helpers.default_net import DefaultNet
  from lightwood.api.types import PredictionArguments
  from lightwood.mixer.helpers.transform_corss_entropy_loss import TransformCrossEntropyLoss
label_desc: Use image node_id 8 for calling the Neural obj's underlying member method code with example usage: obj._init_net(ds) without return types