def data_class_from_pvspec(group, pvspec):
    """Return the data class for a given PVSpec in a group"""
    if pvspec.read_only:
        return group.type_map_read_only[pvspec.dtype]
    return group.type_map[pvspec.dtype]
