code: def merge(self, arg1, arg2=None, arg3=None):
      # this function is used to merge both descriptors and pools
      if determineEdt(arg1) == Edt.POOL:
          if arg3:
              raise TypeError(
                  "Pool.merge requires only 3 arguments when "
                  + "merging entire pools: self, pool, string"
              )
          if not arg2:
              mergeType = ""
          else:
              mergeType = arg2
          return self.cppPool.__merge__(
              str(Edt(Edt.POOL)), arg1.cppPool, mergeType
          )
  
      key = arg1
      value = arg2
      mergeType = arg3
      if not mergeType:
          mergeType = ""
  
      givenType = determineEdt(value)
  
      # if we've seen this key before, determine the type
      if self.containsKey(key):
          goalType = Edt(
              self.cppPool.__keyType__(key)
          )  # .devectorize()
  
      # if we haven't seen this type before, we will have to guess its type
      else:
          if givenType in (
              Edt.REAL,
              Edt.STRING,
              Edt.STEREOSAMPLE,
              Edt.VECTOR_REAL,
              Edt.VECTOR_STRING,
              Edt.VECTOR_STEREOSAMPLE,
              Edt.MATRIX_REAL,
              Edt.VECTOR_VECTOR_REAL,
              Edt.VECTOR_MATRIX_REAL,
              Edt.VECTOR_TENSOR_REAL,
              Edt.TENSOR_REAL,
          ):
              goalType = givenType
  
          # some exceptions
          elif givenType == Edt.INTEGER:
              goalType = Edt(Edt.REAL)
          elif givenType == Edt.LIST_REAL:
              goalType = Edt(Edt.VECTOR_REAL)
          elif givenType == Edt.LIST_INTEGER:
              goalType = Edt(Edt.VECTOR_REAL)
          elif givenType == Edt.VECTOR_INTEGER:
              goalType = Edt(Edt.VECTOR_REAL)
  
          else:
              raise TypeError(
                  "Pool.merge does not support the type: "
                  + str(givenType)
              )
  
      # try to convert the type
      try:
          convertedVal = convertData(value, goalType)
      except TypeError:
          raise KeyError(
              "Pool.merge could not convert given data to the type already in the Pool under the key'"
              + key
              + "'"
          )
  
      return self.cppPool.__merge__(
          key, str(goalType), convertedVal, mergeType
      )
  
imports: import numpy
  from six import iteritems
  from .None import _essentia
label_desc: Use image node_id 4 for calling the Pool obj's underlying member method code with example usage: obj.merge(arg1, arg2, arg3) and returns: self, self