<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _check_daylong(tr):
 """ Check the data quality of the daylong file. Check to see that the day isn't just zeros, with large steps, if it is then the resampling will hate it. :type tr: obspy.core.trace.Trace :param tr: Trace to check if the data are daylong. :return quality (simply good or bad) :rtype: bool .. rubric:: Example True """

    if len(np.nonzero(tr.data)[0]) < 0.5 * len(tr.data):
        qual = False
    else:
        qual = True
    return qual