def METHOD_NAME(self, key, value):
    """
    Add a key, value pair.
    """
    if self._unique and (key in self._nodes):
        message = f"duplicate {key!r} in unique index"
        raise ValueError(message)
    self._nodes.METHOD_NAME(Node(key, value))