class_docstr: Computes the standard deviation for each metric from samples.
class_docstr_tok: ["Computes","the","standard","deviation","for","each","metric","from","samples","."]
code: def add_input(
      self,
      accumulator: "SampleCombineFn.SampleAccumulator",
      sample: SampleMetrics,
  ) -> "SampleCombineFn.SampleAccumulator":
      sample_id = sample.sample_id
      sample = sample.metrics
      if sample_id == self._full_sample_id:
          accumulator.point_estimates = sample
      else:
          accumulator.num_samples += 1
          for metric_key, value in sample.items():
              if not (
                  isinstance(
                      value,
                      (numbers.Number, types.StructuredMetricValue),
                  )
                  or (
                      isinstance(value, np.ndarray)
                      and np.issubdtype(value.dtype, np.number)
                  )
              ):
                  # A value must be a number, a StructuredMetricValue, or a numeric
                  # NumPy array. If none of those matches, skip. The absence of any
                  # sample for a specific metric_key will cause _validate_accumulator to
                  # remove all samples, which will result in no CI computation for that
                  # metric key.
                  continue
              if (
                  self._skip_ci_metric_keys
                  and metric_key in self._skip_ci_metric_keys
              ):
                  continue
              accumulator.metric_samples[metric_key].append(value)
      return accumulator
  
file_path: model-analysis/tensorflow_model_analysis/evaluators/confidence_intervals_util.py
imports: import collections
  import numbers
  from typing import Iterable, NamedTuple, Optional, Sequence, Set, Tuple
  import apache_beam
  import numpy
  from tensorflow_model_analysis import constants
  from tensorflow_model_analysis.api import types
  from tensorflow_model_analysis.metrics import metric_types
  from tensorflow_model_analysis.post_export_metrics import metric_keys
label_desc: Use image node_id 3 for calling the SampleCombineFn obj's underlying member method code with example usage: obj.add_input(accumulator, sample) and returns: accumulator