code: def init_parameter(dims):
      """
      Create and initialize a new torch Parameter.
  
      Parameters
      ----------
          dims : list or tuple
              Desired dimensions of parameter
  
      Returns
      -------
          nn.Parameter
              initialized Parameter
      """
      if len(dims) > 1:
          return nn.Parameter(
              nn.init.xavier_normal_(torch.randn(dims)),
              requires_grad=True,
          )
      else:
          return nn.Parameter(
              torch.nn.init.xavier_normal_(
                  torch.randn([1] + dims)
              ).squeeze(0),
              requires_grad=True,
          )
  
file_path: neural_prophet/neuralprophet/utils_torch.py
imports: import inspect
  import logging
  import numpy
  import pytorch_lightning
  import torch
  import torch.nn
  from captum.attr import Saliency
label_desc: Use image node_id 1 for calling a global function with example usage: init_parameter(dims) and returns: nn, nn