def labeled_point_to_row_col_period(labeled_point):
    """Helper function to reconstruct period, row, and column of labeled point

    Used in .map call for predictions

    Args:
      labeled_point (LabeledPoint): cell with label and features

    Returns:
      tuple (int, int, str): row, col, period
    """
    features = labeled_point.features
    row, col = features[0], features[1]
    month, day, hour = features[2], features[3], features[4]
    period = '2013{:02d}{:02d}{:02d}'.format(int(month), int(day), int(hour))
    return row, col, period