def METHOD_NAME(val: Union[np.ndarray, Sequence, Sample]) -> np.dtype:
    """Get the dtype of a non-uniform mixed dtype sequence of samples."""
    if hasattr(val, "dtype"):
        return np.dtype(val.dtype)  # type: ignore
    elif isinstance(val, int):
        return np.array(0).dtype
    elif isinstance(val, float):
        return np.array(0.0).dtype
    elif isinstance(val, str):
        return np.array("").dtype
    elif isinstance(val, bool):
        return np.dtype(bool)
    elif isinstance(val, Sequence):
        return reduce(_get_bigger_dtype, map(METHOD_NAME, val))
    else:
        raise TypeError(f"Cannot infer numpy dtype for {val}")