code: def merge(self, other):
          '''Merge two element counters. For all elements, we take the max count from both counters.'''
          our_element_frequencies = self.items
          their_element_frequencies = other.items
          for element_name, freq in sorted(our_element_frequencies.iteritems()):
              our_element_frequencies[element_name] = max(our_element_frequencies.get(element_name, 0), their_element_frequencies.get(element_name, 0))
          for element_name, freq in sorted(their_element_frequencies.iteritems()):
              if element_name not in our_element_frequencies:
                  our_element_frequencies[element_name] = their_element_frequencies[element_namef merge(self, other):
          '''Merge two element counters. For all elements, we take the max count from both counters.'''
          our_element_frequencies = self.items
          their_element_frequencies = other.items
          for element_name, freq in sorted(our_element_frequencies.iteritems()):
              our_element_frequencies[element_name] = max(our_element_frequencies.get(element_name, 0), their_element_frequencies.get(element_name, 0))
          for element_name, freq in sorted(their_element_frequencies.iteritems()):
              if element_name not in our_element_frequencies:
                  our_element_frequencies[element_name] = their_element_frequencies[element_name]
docs: Merge two element counters. For all elements, we take the max count from both counters.