class_docstr: A memory-efficient class for contamination stats. The core data structures are bit arrays where
  every bit records whether an instance is contaminated or not.
class_docstr_tok: ["A","memory-efficient","class","for","contamination","stats",".","The","core","data","structures","are","bit","arrays","where","every","bit","records","whether","an","instance","is","contaminated","or","not","."]
docstr: Merge two stats instance of the same scenario
docstr_tok: ["Merge","two","stats","instance","of","the","same","scenario"]
code: def merge(self, stats):
      """Merge two stats instance of the same scenario"""
      if self.stats_key != stats.stats_key:
          raise ValueError(
              "Only stats with the same `stats_key` can be merged."
          )
      if self.num_instances != stats.num_instances:
          raise ValueError(
              "The sizes of the two scenarios need to equal."
          )
      self._input_bits |= stats._input_bits
      self._reference_bits |= stats._reference_bits
  
file_path: H2O/h2o_hf/helm/src/helm/benchmark/contamination/contamination_stats.py
imports: from bitarray import bitarray
  from typing import Optional, Dict, Any, Hashable
  from dataclasses import dataclass
  from helm.benchmark.contamination.light_scenario import LightScenario, LightScenarioKey
  from helm.common.general import asdict_without_nones
label_desc: Use image node_id 5 for calling the ContaminationStats obj's underlying member method code with example usage: obj.merge(stats) without return types