code: def _summary_stats(
      data: pd.Series,
      data_name: Optional[str] = None,
      data_kwargs: Optional[Dict] = None,
  ) -> pd.DataFrame:
      """Provides Summary Statistics for the data
  
      Parameters
      ----------
      data : pd.Series
          Data whose summary statistics need to be calculated
      data_kwargs : Optional[Dict], optional
          Useful for time series analysis. Users can specify `lags list` and
          `order_list` to get summary statistics for the data as well as for its
          lagged versions, by default None
  
          >>> summary_statistics(data=data, data_kwargs={"order_list": [1, 2]})
          >>> summary_statistics(data=data, data_kwargs={"lags_list": [1, [1, 12]]})
  
      Returns
      -------
      pd.DataFrame
          Dataframe containing the summary statistics
      """
      test_category = "Summary"
  
      # Step 1: Get list of all data that needs to be tested ----
      diff_list, name_list = _get_diff_name_list(
          data=data, data_name=data_name, data_kwargs=data_kwargs
      )
  
      # Step 2: Test all data ----
      results_list = []
      for data_, name_ in zip(diff_list, name_list):
          # Step 2A: Get Test Results ----
          distinct_counts = dict(data_.value_counts(normalize=True))
          results_dict = {
              "Length": len(data_),
              "# Missing Values": data_.isna().sum(),
              "Mean": data_.mean(),
              "Median": data_.median(),
              "Standard Deviation": data_.std(),
              "Variance": data_.var(),
              "Kurtosis": data_.kurt(),
              "Skewness": data_.skew(),
              "# Distinct Values": len(distinct_counts),
          }
  
          # Step 2B: Create Result DataFrame ----
          results = pd.DataFrame(
              results_dict, index=["Value"]
          ).T.reset_index()
          results["Data"] = name_
  
          # Step 2C: Update list of all results ----
          results_list.append(results)
  
      # Step 3: Combine all results ----
      results = pd.concat(results_list)
      results.reset_index(inplace=True)
  
      # Step 4: Format Results ----
      results = _format_test_results(
          results, test_category, "Statistics"
      )
  
      # Step 5: Return values ----
      return results
  
imports: from typing import Dict, List, Optional, Tuple, Union
  import pandas
  from scipy.stats import shapiro
  from pycaret.internal.tests import _format_test_results
  from pycaret.utils.time_series import _get_diff_name_list
label_desc: Use image node_id 1 for calling a global function with example usage: _summary_stats(data, data_name, data_kwargs) and returns: results