def METHOD_NAME(model_obj, fields, data, chunk_size):
    """Split the data on record boundaries, in chunks of minimum chunk_size"""
    fields = list(map(fix_import_export_id_paths, fields))
    row_from = 0
    for rows in model_obj._extract_records(fields, data):
        rows = rows[1]["rows"]
        if rows["to"] - row_from + 1 >= chunk_size:
            yield row_from, rows["to"]
            row_from = rows["to"] + 1
    if row_from < len(data):
        yield row_from, len(data) - 1