code: def run_welchs_ttest(stat1, stat2, alpha, faster):
      """Run one tailed Welch's t-test to verify if stat1 is faster/slower than stat2
  
      Please refer wiki for more details about Welch's t-test.
      https://en.wikipedia.org/wiki/Welch%27s_t-test
  
      Please check scipy for the t-test implementation details.
      https://github.com/scipy/scipy/blob/v1.7.1/scipy/stats/stats.py#L5712-L5833
  
      The confidence interval is computed with one sided approach. For more details, see
      https://stats.stackexchange.com/questions/257526/can-one-sided-confidence-intervals-have-95-coverage
  
      Args:
        stat1: The first statistic dict collected by pytest-benchmark.
        stat2: The second statistic dict collected by pytest-benchmark.
        alpha: The confidence level.
        faster: True to test if stat1 is faster than stat2. False to test
                if stat1 is slower than stat2.
  
      Returns:
        A TTestResult
      """
      m1 = stat1[MEAN]
      m2 = stat2[MEAN]
  
      s1 = stat1[STDDEV]
      s2 = stat2[STDDEV]
  
      n1 = stat1[ROUNDS]
      n2 = stat2[ROUNDS]
  
      df1 = n1 - 1  # degree of freedom of stat1
      df2 = n2 - 1  # degree of freedom of stat2
  
      sample_v1 = (
          s1**2 / n1
      )  # biased estimated sample variance of stat1
      sample_v2 = (
          s2**2 / n2
      )  # biased estimated sample variance of stat2
  
      biased_variance = np.sqrt(sample_v1 + sample_v2)
      # degree of freedom
      df = (sample_v1 + sample_v2) ** 2 / (
          sample_v1**2 / (df1) + sample_v2**2 / (df2)
      )
  
      mean_delta = m1 - m2
      t_stat = mean_delta / biased_variance
  
      if faster:
          # Null hypothesis is stat1 >= stat2.
          # Alternative hypothesis is stat1 < stat2.
          p_value = t.cdf(t_stat, df)
  
          # Compute one sided confidence interval (-inf, x)
          upper_bound = (
              mean_delta + t.ppf(1.0 - alpha, df) * biased_variance
          )
          upper_bound = format(upper_bound, ".5f")
          lower_bound = "-inf"
      else:
          # Null hypothesis is stat1 <= stat2.
          # Alternative hypothesis is stat1 > stat2.
          p_value = 1.0 - t.cdf(t_stat, df)
  
          # Compute one sided confidence interval (x, inf)
          upper_bound = "inf"
          lower_bound = mean_delta + t.ppf(alpha, df) * biased_variance
          lower_bound = format(lower_bound, ".5f")
  
      return TTestResult(
          p_value=p_value,
          t_stat=t_stat,
          lower_bound=lower_bound,
          upper_bound=upper_bound,
          mean_delta=format(mean_delta, ".5f"),
      )
  
imports: import argparse
  import collections
  import logging
  import json
  import os
  from operator import attrgetter
  import numpy
  from scipy.stats import t
label_desc: Use image node_id 2 for calling a global function with example usage: run_welchs_ttest(stat1, stat2, alpha, faster) and returns: TTestResult