docs: def qteRemoveKey(self, keysequence: QtmacsKeysequence):
          """
          Remove ``keysequence`` from this key map.
  
          |Args|
  
          * ``keysequence`` (**QtmacsKeysequence**): key sequence to
            remove from this key map.
  
          |Returns|
  
          **None**
  
          |Raises|
  
          * **QtmacsArgumentError** if at least one argument has an invalid type.
          """
          # Get a dedicated reference to self to facilitate traversing
          # through the key map.
          keyMap = self
  
          # Keep a reference to the root element in the key map.
          keyMapRef = keyMap
  
          # Get the key sequence as a list of tuples, where each tuple
          # contains the the control modifier and the key code, and both
          # are specified as Qt constants.
          keysequence = keysequence.toQtKeylist()
  
          # ------------------------------------------------------------
          # Remove the leaf element from the tree.
          # ------------------------------------------------------------
          for key in keysequence[:-1]:
              # Quit if the key does not exist. This can happen if the
              # user tries to remove a key that has never been
              # registered.
              if key not in keyMap:
                  return
  
              # Go one level down in the key-map tree.
              keyMap = keyMap[key]
  
          # The specified key sequence does not exist if the leaf
          # element (ie. last entry in the key sequence) is missing.
          if keysequence[-1] not in keyMap:
              return
          else:
              # Remove the leaf.
              keyMap.pop(keysequence[-1])
  
          # ------------------------------------------------------------
          # Prune the prefix path defined by ``keysequence`` and remove
          # all empty dictionaries. Start at the leaf level.
          # ------------------------------------------------------------
  
          # Drop the last element in the key sequence, because it was
          # removed in the above code fragment already.
          keysequence = keysequence[:-1]
  
          # Now successively remove the key sequence in reverse order.
          while(len(keysequence)):
              # Start at the root and move to the last branch level
              # before the leaf level.
              keyMap = keyMapRef
              for key in keysequence[:-1]:
                  keyMap = keyMap[key]
  
              # If the leaf is a non-empty dictionary then another key
              # with the same prefix still exists. In this case do
              # nothing. However, if the leaf is now empty it must be
              # removed.
              if len(keyMap[key]):
                  return
              else:
                  keyMap.pop(key)