def maxKey(key=None):
    """Return the maximum key.

        If a key argument if provided and not None, return the largest key
        that is less than or equal to the argument.  Raise an exception if
        no such key exists.
        """
