code: def jarque_bera_normality(
      data: pd.Series, confidence_level: float = 0.05
  ) -> TestResult:
      """The Jarque-Bera test statistic tests the null hypothesis that the data is normally
      distributed against an alternative that the data follow some other distribution.
  
      Args:
          data (pd.Series): Time series.
          confidence_level (float): Confidence level for rejecting the null hypothesis.
  
      Returns:
          TestResult: test name, p-value, null hypothesis, reject?, confidence level and details.
  
      See Also:
          https://www.statsmodels.org/stable/generated/statsmodels.stats.stattools.jarque_bera.html
      """
      ser_clean = data
      if np.isnan(data).any():
          ser_clean = data.dropna()
          warnings.warn("Found and removed N/A values.", UserWarning)
  
      (
          jarque_bera_test_statistic,
          p_value,
          skew,
          kurtosis,
      ) = sms.jarque_bera(ser_clean)
      outcome_specifics = {
          "jarque_bera_test_statistic": float(
              jarque_bera_test_statistic
          ),
          "skew": float(skew),
          "kurtosis": float(kurtosis),
      }
      reject_h0 = bool(p_value < confidence_level)
      result = TestResult(
          test="Jarque Bera",
          p_value=p_value,
          confidence_level=confidence_level,
          null_hypothesis="Data is normally distributed",
          reject_null_hypothesis=reject_h0,
          details=outcome_specifics,
      )
  
      return result
  
file_path: tslumen/tslumen/profile/stat_tests.py
imports: from typing import Dict, Any, Optional
  from dataclasses import dataclass
  import math
  import warnings
  import numpy
  import pandas
  import scipy
  import statsmodels.stats.api
  from statsmodels.tsa.tsatools import freq_to_period
  from statsmodels.tsa.stattools import acf, adfuller, kpss
  from tslumen.profile.base import ProfilingFunction, _DCDict
  from tslumen.misc import repr_html
label_desc: Use image node_id 3 for calling a global function with example usage: jarque_bera_normality(data, confidence_level) and returns: result