from typing import Tuple


def hdf5_01_encode(uid: str, cksum: str, dset: int, dset_idx: int,
                   shape: Tuple[int]) -> bytes:
    """converts the hdf5 data has spec to an appropriate db value

    Parameters
    ----------
    uid : str
        the file name prefix which the data is written to.
    cksum : int
        xxhash_64.hex_digest checksum of the data bytes in numpy array form.
    dset : int
        collection (ie. hdf5 dataset) name to find this data piece.
    dset_idx : int
        collection first axis index in which this data piece resides.
    shape : Tuple[int]
        shape of the data sample written to the collection idx. ie:
        what subslices of the hdf5 dataset should be read to retrieve
        the sample as recorded.

    Returns
    -------
    bytes
        hash data db value recording all input specifications.
    """
    shape_str = " ".join([str(i) for i in shape])
    return f'01:{uid}:{cksum}:{dset}:{dset_idx}:{shape_str}'.encode()