code: def test_normal_likelihood(loc: float, scale: float):
      locs = torch.zeros((NUM_SAMPLES,)) + loc
      scales = torch.zeros((NUM_SAMPLES,)) + scale
  
      distr = Normal(loc=locs, scale=scales)
      samples = distr.sample()
  
      init_bias = [
          loc - START_TOL_MULTIPLE * TOL * loc,
          inv_softplus(scale - START_TOL_MULTIPLE * TOL * scale),
      ]
  
      loc_hat, scale_hat = maximum_likelihood_estimate_sgd(
          NormalOutput(),
          samples,
          init_biases=init_bias,
          num_epochs=5,
          learning_rate=1e-3,
      )
  
      assert (
          np.abs(loc_hat - loc) < TOL * loc
      ), f"loc did not match: loc = {loc}, loc_hat = {loc_hat}"
      assert (
          np.abs(scale_hat - scale) < TOL * scale
      ), f"scale did not match: scale = {scale}, scale_hat = {scale_hat}"
  
imports: from typing import List
  import numpy
  import pytest
  import torch
  import torch.nn
  from scipy.special import softmax
  from torch.distributions import Beta, Gamma, NegativeBinomial, Normal, Poisson, StudentT
  from torch.nn.utils import clip_grad_norm_
  from torch.optim import SGD
  from torch.utils.data import DataLoader, TensorDataset
  from gluonts.pydantic import PositiveFloat, PositiveInt
  from gluonts.torch.distributions import BetaOutput, DistributionOutput, GammaOutput, NegativeBinomialOutput, NormalOutput, PoissonOutput, SplicedBinnedPareto, SplicedBinnedParetoOutput, StudentTOutput
label_desc: Use image node_id 7 for calling a global function with example usage: test_normal_likelihood(loc, scale) without return types