def create_alias(dataset, attributes, delimiter='-'):
    """Create alias key of a dataset using a list of attributes.

    Parameters
    ----------
    dataset : dict
        Metadata dictionary representing a single dataset.
    attributes : list of str
        List of attributes used to create the alias.
    delimiter : str, optional (default: '-')
        Delimiter used to separate different attributes in the alias.

    Returns
    -------
    str
        Dataset alias.

    Raises
    ------
    AttributeError
        ``dataset`` does not contain one of the ``attributes``.

    """
    alias = []
    if not attributes:
        raise ValueError(
            "Expected at least one element for attributes, got empty list")
    for attribute in attributes:
        if attribute not in dataset:
            raise AttributeError(
                f"Dataset {dataset} does not contain attribute '{attribute}' "
                f"for alias creation")
        alias.append(dataset[attribute])
    return delimiter.join(alias)