code: def total_variance(
      means: np.ndarray, variances: np.ndarray, sample_sizes: np.ndarray
  ) -> float:
      """Compute total variance."""
      variances = variances * sample_sizes
      weighted_variance_of_means = np.average(
          (means - means.mean()) ** 2, weights=sample_sizes
      )
      weighted_mean_of_variance = np.average(
          variances, weights=sample_sizes
      )
      return (
          weighted_variance_of_means + weighted_mean_of_variance
      ) / sample_sizes.sum()
  
file_path: Ax/ax/utils/stats/statstools.py
imports: from logging import Logger
  from typing import List, Tuple, Union
  import numpy
  import pandas
  from ax.core.data import Data
  from ax.utils.common.logger import get_logger
label_desc: Use image node_id 2 for calling a global function with example usage: total_variance(means, variances, sample_sizes) and returns: unknown