@classmethod
def product(cls, new_name, *keys):
    """Return a new Key that has the union of dimensions on *keys*.

        Dimensions are ordered by their first appearance:

        1. First, the dimensions of the first of the *keys*.
        2. Next, any additional dimensions in the second of the *keys* that
           were not already added in step 1.
        3. etc.

        Parameters
        ----------
        new_name : str
            Name for the new Key. The names of *keys* are discarded.
        """
    base_dims = list(keys[0].dims)
    new_dims = []
    for key in keys[1:]:
        new_dims.extend(set(key.dims) - set(base_dims) - set(new_dims))
    return cls(new_name, base_dims + new_dims)
