<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def kinesia_scores(self, data_frame):
 """ This method calculates the number of key taps :param data_frame: the data frame :type data_frame: pandas.DataFrame :return ks: key taps :rtype ks: float :return duration: test duration (seconds) :rtype duration: float """

        # tap_timestamps = data_frame.td[data_frame.action_type == 1]
        # grouped = tap_timestamps.groupby(pd.TimeGrouper('30u'))
        # return np.mean(grouped.size().values)
        ks = sum(data_frame.action_type == 1)
        duration = math.ceil(data_frame.td[-1])
        return ks, duration