Write a function to parse and analyze large sets of data efficiently.
Implement parse_and_analyze(records), where records is a list of valid comma-separated strings in the format category,value. Return a dictionary mapping each category to an object containing its record count and numeric sum. Process records in one pass and preserve the order in which categories first appear.
list[str]dict[str, dict[str, int]]category,valuedef parse_and_analyze(records):