class_docstr: Implements SQuAD metrics, maximizing over answers per question.
class_docstr_tok: ["Implements","SQuAD","metrics",",","maximizing","over","answers","per","question","."]
docstr: Returns `Squad` that is the accumulation of `self` and `other`.
  
  Args:
    other: A `Squad` whose inermediate values should be accumulated onto the
      values of `self`. Note that in a distributed setting, `other` will
      typically be the output of a `jax.lax` parallel operator and thus have a
      dimension added to the dataclass returned by `.from_model_output()`.
  
  Returns:
    A new `Squad` that accumulates the value from both `self` and `other`.
docstr_tok: ["Returns","`","Squad","`","that","is","the","accumulation","of","`","self","`","and","`","other","`",".","Args",":","other",":","A","`","Squad","`","whose","inermediate","values","should","be","accumulated","onto","the","values","of","`","self","`",".","Note","that","in","a","distributed","setting",",","`","other","`","will","typically","be","the","output","of","a","`","jax.lax","`","parallel","operator","and","thus","have","a","dimension","added","to","the","dataclass","returned","by","`",".from_model_output","(",")","`",".","Returns",":","A","new","`","Squad","`","that","accumulates","the","value","from","both","`","self","`","and","`","other","`","."]
code: def merge(self, other: "ShardedSquad") -> "ShardedSquad":
      """Returns `Squad` that is the accumulation of `self` and `other`.
  
      Args:
        other: A `Squad` whose inermediate values should be accumulated onto the
          values of `self`. Note that in a distributed setting, `other` will
          typically be the output of a `jax.lax` parallel operator and thus have a
          dimension added to the dataclass returned by `.from_model_output()`.
  
      Returns:
        A new `Squad` that accumulates the value from both `self` and `other`.
      """
      count = self.count + other.count
      f1 = (self.f1 * self.count + other.f1 * other.count) / count
      em = (self.em * self.count + other.em * other.count) / count
  
      return type(self)(f1=f1, em=em, count=count)
  
imports: import collections
  import itertools
  import re
  import string
  from typing import Any, Dict, Mapping, Optional, Sequence, Tuple, Union
  from absl import logging
  import editdistance
  import flax
  import jax.numpy
  import numpy
  import sacrebleu
  import scipy.stats
  import seqio
  import sklearn.metrics
  from t5.evaluation import qa_utils
  import tensorflow.compat.v2
  from rouge_score import rouge_scorer
  from rouge_score import scoring
label_desc: Use image node_id 3 for calling the ShardedSquad obj's underlying member method code with example usage: obj.merge(other) and returns: type