code: def __init__(
      self,
      dim: Optional[int] = 0,
  ) -> None:
      super().__init__()
      if dim is None:
          dim = -1
      self.dim = dim
  
imports: from enum import Enum, auto
  import torch
  from torch import Tensor
  from ..utils import parametrize
  from ..modules import Module
  from ..None import functional
  from typing import Optional
label_desc: Use image node_id 1 to create a new _WeightNorm object from inherited base classes: Module with example: obj = _WeightNorm(dim)