<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def parse_dtype(features, check=True):
 """Return the features scalar type, raise if error Raise IOError if all features have not the same data type. Return dtype, the features scalar type. """

    dtype = features[0].dtype
    if check:
        types = [x.dtype for x in features]
        if not all([t == dtype for t in types]):
            raise IOError('features must be homogeneous')
    return dtype