with INPUT_PATH.open(newline="") as handle: reader = csv.DictReader(handle) expected_columns = [ID_COLUMN, *FEATURE_COLUMNS] if reader.fieldnames != expected_columns: raise ValueError(f"Expected CSV columns: {expected_columns}") input_rows = list(reader) if not input_rows: raise ValueError("The input CSV has no data rows")