def get_h5_dataset_shape_from_descriptor_shape(
    descriptor_shape, ep_data_key, ep_data_list
):
    """
    Return the initial shape of the h5 dataset corresponding to the specified data_key.
    Initially the dataset will have length 0. It will be resized when data is appended.

    The descriptor shape will be either an empty list or a list of integers.

    The return will be a sequence of integers beginning with 0. For example:
        descriptor shape [] -> h5 dataset shape (1, )
        descriptor shape [0, 100, 100] -> h5 dataset (1, 100, 100)

    Parameters
    ----------
    descriptor_shape: Sequence of int, possibly empty
        the "shape" field for ep_data_key taken from a descriptor document
    ep_data_key: str
        bluesky data_key
    ep_data_list: list
        event_page list of data values: int, str, float, or array for ep_data_key

    Returns
    -------
    tuple, the initial shape of the h5 dataset corresponding to ep_data_key, the first element of which
    will be 0 to indicate the dataset should be created empty
    """
    print(f"descriptor_shape: {descriptor_shape}")
    if not isinstance(descriptor_shape, list):
        raise ValueError(
            f"descriptor_shape must be a list, but is a {type(descriptor_shape)}"
        )
    elif len(descriptor_shape) == 0:
        # descriptor_shape is []
        return (1,)
    else:
        if descriptor_shape[0] != 0:
            raise ValueError(
                f"descriptor shape for data_key {ep_data_key} should start with 0 but is {descriptor_shape}"
            )
        return (1, *descriptor_shape[1:])