def bits_to_str_dtype(bits: int) -> str:
    """
    Get the required (string) datatype for data encoded on given bits.

    Parameters
    ----------
    bits
        Number of bits used to encode data

    Returns
    -------
    str_dtype
        Datatype (in string format) for given `bits`
    """
    if bits > 16:
        return 'uint32'
    elif bits > 8:
        return 'uint16'
    else:
        return 'uint8'