class_docstr: Helper base class for the :class:`Domain` and :class:`Sample` classes.
  
  It implements common logic for creation, representation, type conversion
  and serialisation.
class_docstr_tok: ["Helper","base","class","for","the",":","class",":","`","Domain","`","and",":","class",":","`","Sample","`","classes",".","It","implements","common","logic","for","creation",",","representation",",","type","conversion","and","serialisation","."]
docstr: Merge self with the `other` :class:`_RecursiveDict`.
  
  Args:
      other: :class:`_RecursiveDict`. The recursive dictionary that will
          be merged into the current one.
  
  Returns:
      A new :class:`_RecursiveDict` object consisting of the subdomains
      of both domains. If the keys overlap and the subdomains are discrete
      or categorical, the values will be unified.
  
  Raises:
      :obj:`ValueError`: if identical keys point to different values.
docstr_tok: ["Merge","self","with","the","`","other","`",":","class",":","`","_RecursiveDict","`",".","Args",":","other",":",":","class",":","`","_RecursiveDict","`",".","The","recursive","dictionary","that","will","be","merged","into","the","current","one",".","Returns",":","A","new",":","class",":","`","_RecursiveDict","`","object","consisting","of","the","subdomains","of","both","domains",".","If","the","keys","overlap","and","the","subdomains","are","discrete","or","categorical",",","the","values","will","be","unified",".","Raises",":",":","obj",":","`","ValueError","`",":","if","identical","keys","point","to","different","values","."]
code: def __add__(self, other: "_RecursiveDict"):
      """Merge self with the `other` :class:`_RecursiveDict`.
  
      Args:
          other: :class:`_RecursiveDict`. The recursive dictionary that will
              be merged into the current one.
  
      Returns:
          A new :class:`_RecursiveDict` object consisting of the subdomains
          of both domains. If the keys overlap and the subdomains are discrete
          or categorical, the values will be unified.
  
      Raises:
          :obj:`ValueError`: if identical keys point to different values.
      """
      flattened_a = self.flatten()
      flattened_b = other.flatten()
      # validate that the two _RecursiveDicts are disjoint
      if len(flattened_a.keys()) > len(
          flattened_a.keys() - flattened_b.keys()
      ):
          raise ValueError(
              f"Ambiguous addition of {self.__class__.__name__} objects."
          )
      merged = list(flattened_a.items())
      merged.extend(list(flattened_b.items()))
      return self.__class__.from_list(merged)
  
imports: import ast
  import copy
  import os
  import pickle
  import random
  from collections import namedtuple
  from typing import Tuple
label_desc: Use image node_id 8 for calling the _RecursiveDict obj's underlying member method code with example usage: obj.__add__(other) and returns: self