def _parse_line(line, separator='::'):
    """
    Parse a line in dataset
    :param line: str
        A line in dataset (utf-8)
    :param separator: str | '::'
        Seperator between fields
    :return: A generator of 4-tuple (user_id, item_id, rating, timestamp)
    """
    uid, iid, rating, timestamp = line.split(separator)
    return int(uid) - 1, int(iid) - 1, int(rating), int(timestamp)