nodes: 0, module; 1, function_definition; 2, function_name:symmetric_difference_update; 3, parameters; 4, block; 5, identifier:self; 6, identifier:other; 7, expression_statement; 8, expression_statement; 9, expression_statement; 10, for_statement; 11, comment:r"""Update the multiset to contain only elements in either this multiset or the other but not both.
  
          >>> ms = Multiset('aab')
          >>> ms.symmetric_difference_update('abc')
          >>> sorted(ms)
          ['a', 'c']
  
          You can also use the ``^=`` operator for the same effect. However, the operator version
          will only accept a set as other operator, not any iterable, to avoid errors.
  
          >>> ms = Multiset('aabbbc')
          >>> ms ^= Multiset('abd')
          >>> sorted(ms)
          ['a', 'b', 'b', 'c', 'd']
  
          For a variant of the operation which does not modify the multiset, but returns a new
          multiset instead see :meth:`symmetric_difference`.
  
          Args:
              other: The other set to take the symmetric difference with. Can also be any :class:`~typing.Iterable`\[~T]
                  or :class:`~typing.Mapping`\[~T, :class:`int`] which are then converted to :class:`Multiset`\[~T].
          """; 12, assignment; 13, assignment; 14, identifier:element; 15, identifier:elements; 16, block; 17, identifier:other; 18, call; 19, identifier:elements; 20, binary_operator:set(self.distinct_elements()) | set(other.distinct_elements()); 21, expression_statement; 22, expression_statement; 23, expression_statement; 24, attribute; 25, argument_list; 26, call; 27, call; 28, assignment; 29, assignment; 30, assignment; 31, identifier:self; 32, identifier:_as_multiset; 33, identifier:other; 34, identifier:set; 35, argument_list; 36, identifier:set; 37, argument_list; 38, identifier:multiplicity; 39, subscript; 40, identifier:other_count; 41, subscript; 42, subscript; 43, parenthesized_expression; 44, call; 45, call; 46, identifier:self; 47, identifier:element; 48, identifier:other; 49, identifier:element; 50, identifier:self; 51, identifier:element; 52, conditional_expression:multiplicity - other_count if multiplicity > other_count else other_count - multiplicity; 53, attribute; 54, argument_list; 55, attribute; 56, argument_list; 57, binary_operator:multiplicity - other_count; 58, comparison_operator:multiplicity > other_count; 59, binary_operator:other_count - multiplicity; 60, identifier:self; 61, identifier:distinct_elements; 62, identifier:other; 63, identifier:distinct_elements; 64, identifier:multiplicity; 65, identifier:other_count; 66, identifier:multiplicity; 67, identifier:other_count; 68, identifier:other_count; 69, identifier:multiplicity
code: def symmetric_difference_update(self, other):
          r"""Update the multiset to contain only elements in either this multiset or the other but not both.
  
          >>> ms = Multiset('aab')
          >>> ms.symmetric_difference_update('abc')
          >>> sorted(ms)
          ['a', 'c']
  
          You can also use the ``^=`` operator for the same effect. However, the operator version
          will only accept a set as other operator, not any iterable, to avoid errors.
  
          >>> ms = Multiset('aabbbc')
          >>> ms ^= Multiset('abd')
          >>> sorted(ms)
          ['a', 'b', 'b', 'c', 'd']
  
          For a variant of the operation which does not modify the multiset, but returns a new
          multiset instead see :meth:`symmetric_difference`.
  
          Args:
              other: The other set to take the symmetric difference with. Can also be any :class:`~typing.Iterable`\[~T]
                  or :class:`~typing.Mapping`\[~T, :class:`int`] which are then converted to :class:`Multiset`\[~T].
          """
          other = self._as_multiset(other)
          elements = set(self.distinct_elements()) | set(other.distinct_elements())
          for element in elements:
              multiplicity = self[element]
              other_count = other[element]
              self[element] = (multiplicity - other_count if multiplicity > other_count else other_count - multiplicity)