[{"data":1,"prerenderedAt":9830},["ShallowReactive",2],{"tutorials-python-how-to":3,"category-items-python-how-to":600,"content-/python-how-to/document-code":601},[4,22,31,40,49,58,67,76,86,94,103,112,121,130,139,148,158,167,176,185,194,203,212,222,231,240,249,258,267,276,285,297,306,315,324,333,342,351,362,371,380,389,398,407,418,427,436,445,454,463,472,483,492,501,510,519,528,539,548,557,566,575,584,593],{"_path":5,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":9,"description":10,"slug":11,"order":12,"isParent":13,"icon":14,"_type":15,"_id":16,"_source":17,"_file":18,"_stem":19,"_extension":20,"children":21,"expanded":13},"/python-how-to/string-manipulation","python-how-to",false,"","String Manipulation","Learn essential string manipulation techniques in Python","string-manipulation",1,true,"pi pi-folder","markdown","content:python-how-to:1.string-manipulation.md","content","python-how-to/1.string-manipulation.md","python-how-to/1.string-manipulation","md",[22,31,40,49,58,67],{"_path":23,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":24,"description":25,"slug":26,"parentId":5,"order":27,"_type":15,"_id":28,"_source":17,"_file":29,"_stem":30,"_extension":20},"/python-how-to/split-join-strings","Split and Join Strings","Learn how to split strings into lists and join lists back into strings in Python","split-join-strings",2,"content:python-how-to:2.split-join-strings.md","python-how-to/2.split-join-strings.md","python-how-to/2.split-join-strings",{"_path":32,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":33,"description":34,"slug":35,"parentId":5,"order":36,"_type":15,"_id":37,"_source":17,"_file":38,"_stem":39,"_extension":20},"/python-how-to/remove-whitespace","Remove Whitespace","Learn how to clean up and remove unwanted whitespace from strings in Python","remove-whitespace",3,"content:python-how-to:3.remove-whitespace.md","python-how-to/3.remove-whitespace.md","python-how-to/3.remove-whitespace",{"_path":41,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":42,"description":43,"slug":44,"parentId":5,"order":45,"_type":15,"_id":46,"_source":17,"_file":47,"_stem":48,"_extension":20},"/python-how-to/find-replace-text","Find and Replace Text","Learn how to search for and replace text within strings in Python","find-replace-text",4,"content:python-how-to:4.find-replace-text.md","python-how-to/4.find-replace-text.md","python-how-to/4.find-replace-text",{"_path":50,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":51,"description":52,"slug":53,"parentId":5,"order":54,"_type":15,"_id":55,"_source":17,"_file":56,"_stem":57,"_extension":20},"/python-how-to/check-string-content","Check String Content","Learn how to validate and check the content of strings in Python","check-string-content",5,"content:python-how-to:5.check-string-content.md","python-how-to/5.check-string-content.md","python-how-to/5.check-string-content",{"_path":59,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":60,"description":61,"slug":62,"parentId":5,"order":63,"_type":15,"_id":64,"_source":17,"_file":65,"_stem":66,"_extension":20},"/python-how-to/format-strings","Format Strings","Learn how to format strings in Python using f-strings and format() method","format-strings",6,"content:python-how-to:6.format-strings.md","python-how-to/6.format-strings.md","python-how-to/6.format-strings",{"_path":68,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":69,"description":70,"slug":71,"parentId":5,"order":72,"_type":15,"_id":73,"_source":17,"_file":74,"_stem":75,"_extension":20},"/python-how-to/unicode-special-chars","Handle Unicode and Special Characters","Learn how to work with Unicode and special characters in Python strings","unicode-special-chars",7,"content:python-how-to:7.unicode-special-chars.md","python-how-to/7.unicode-special-chars.md","python-how-to/7.unicode-special-chars",{"_path":77,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":78,"description":79,"slug":80,"order":81,"isParent":13,"icon":14,"_type":15,"_id":82,"_source":17,"_file":83,"_stem":84,"_extension":20,"children":85,"expanded":13},"/python-how-to/list-operations","List Operations","Learn essential operations for working with lists in Python","list-operations",8,"content:python-how-to:8.list-operations.md","python-how-to/8.list-operations.md","python-how-to/8.list-operations",[86,94,103,112,121,130,139],{"_path":87,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":88,"description":89,"slug":90,"parentId":77,"order":81,"_type":15,"_id":91,"_source":17,"_file":92,"_stem":93,"_extension":20},"/python-how-to/sort-lists","Sort Lists","Learn how to sort lists in Python using different methods and custom sorting","sort-lists","content:python-how-to:9.sort-lists.md","python-how-to/9.sort-lists.md","python-how-to/9.sort-lists",{"_path":95,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":96,"description":97,"slug":98,"parentId":77,"order":99,"_type":15,"_id":100,"_source":17,"_file":101,"_stem":102,"_extension":20},"/python-how-to/remove-duplicates","Remove Duplicates","Learn how to remove duplicate elements from lists in Python","remove-duplicates",10,"content:python-how-to:10.remove-duplicates.md","python-how-to/10.remove-duplicates.md","python-how-to/10.remove-duplicates",{"_path":104,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":105,"description":106,"slug":107,"parentId":77,"order":108,"_type":15,"_id":109,"_source":17,"_file":110,"_stem":111,"_extension":20},"/python-how-to/filter-lists","Filter Lists","Learn how to filter lists in Python using different methods","filter-lists",11,"content:python-how-to:11.filter-lists.md","python-how-to/11.filter-lists.md","python-how-to/11.filter-lists",{"_path":113,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":114,"description":115,"slug":116,"parentId":77,"order":117,"_type":15,"_id":118,"_source":17,"_file":119,"_stem":120,"_extension":20},"/python-how-to/combine-lists","Combine Lists","Learn different methods to combine lists in Python","combine-lists",12,"content:python-how-to:12.combine-lists.md","python-how-to/12.combine-lists.md","python-how-to/12.combine-lists",{"_path":122,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":123,"description":124,"slug":125,"parentId":77,"order":126,"_type":15,"_id":127,"_source":17,"_file":128,"_stem":129,"_extension":20},"/python-how-to/list-comprehensions","Use List Comprehensions","Learn how to create and transform lists efficiently using Python's list comprehension syntax","list-comprehensions",13,"content:python-how-to:13.list-comprehensions.md","python-how-to/13.list-comprehensions.md","python-how-to/13.list-comprehensions",{"_path":131,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":132,"description":133,"slug":134,"parentId":77,"order":135,"_type":15,"_id":136,"_source":17,"_file":137,"_stem":138,"_extension":20},"/python-how-to/nested-lists","Work with Nested Lists","Learn how to work with nested lists (2D arrays) in Python","nested-lists",14,"content:python-how-to:14.nested-lists.md","python-how-to/14.nested-lists.md","python-how-to/14.nested-lists",{"_path":140,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":141,"description":142,"slug":143,"parentId":77,"order":144,"_type":15,"_id":145,"_source":17,"_file":146,"_stem":147,"_extension":20},"/python-how-to/enumerate-zip","Use enumerate() and zip()","Learn how to use enumerate() and zip() for efficient iteration in Python","enumerate-zip",15,"content:python-how-to:15.enumerate-zip.md","python-how-to/15.enumerate-zip.md","python-how-to/15.enumerate-zip",{"_path":149,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":150,"description":151,"slug":152,"order":153,"isParent":13,"icon":14,"_type":15,"_id":154,"_source":17,"_file":155,"_stem":156,"_extension":20,"children":157,"expanded":13},"/python-how-to/dictionary-operations","Dictionary Operations","Learn essential operations for working with dictionaries in Python","dictionary-operations",16,"content:python-how-to:16.dictionary-operations.md","python-how-to/16.dictionary-operations.md","python-how-to/16.dictionary-operations",[158,167,176,185,194,203],{"_path":159,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":160,"description":161,"slug":162,"parentId":149,"order":163,"_type":15,"_id":164,"_source":17,"_file":165,"_stem":166,"_extension":20},"/python-how-to/merge-dictionaries","Merge Dictionaries","Learn different methods to merge dictionaries in Python","merge-dictionaries",17,"content:python-how-to:17.merge-dictionaries.md","python-how-to/17.merge-dictionaries.md","python-how-to/17.merge-dictionaries",{"_path":168,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":169,"description":170,"slug":171,"parentId":149,"order":172,"_type":15,"_id":173,"_source":17,"_file":174,"_stem":175,"_extension":20},"/python-how-to/sort-dictionaries","Sort Dictionaries","Learn how to sort dictionaries by keys or values in Python","sort-dictionaries",18,"content:python-how-to:18.sort-dictionaries.md","python-how-to/18.sort-dictionaries.md","python-how-to/18.sort-dictionaries",{"_path":177,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":178,"description":179,"slug":180,"parentId":149,"order":181,"_type":15,"_id":182,"_source":17,"_file":183,"_stem":184,"_extension":20},"/python-how-to/filter-dictionaries","Filter Dictionaries","Learn how to filter dictionaries based on keys or values in Python","filter-dictionaries",19,"content:python-how-to:19.filter-dictionaries.md","python-how-to/19.filter-dictionaries.md","python-how-to/19.filter-dictionaries",{"_path":186,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":187,"description":188,"slug":189,"parentId":149,"order":190,"_type":15,"_id":191,"_source":17,"_file":192,"_stem":193,"_extension":20},"/python-how-to/handle-missing-keys","Handle Missing Keys","Learn safe ways to access dictionary keys and handle missing values","handle-missing-keys",20,"content:python-how-to:20.handle-missing-keys.md","python-how-to/20.handle-missing-keys.md","python-how-to/20.handle-missing-keys",{"_path":195,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":196,"description":197,"slug":198,"parentId":149,"order":199,"_type":15,"_id":200,"_source":17,"_file":201,"_stem":202,"_extension":20},"/python-how-to/dictionary-comprehensions","Use Dictionary Comprehensions","Learn how to create dictionaries efficiently using comprehensions","dictionary-comprehensions",21,"content:python-how-to:21.dictionary-comprehensions.md","python-how-to/21.dictionary-comprehensions.md","python-how-to/21.dictionary-comprehensions",{"_path":204,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":205,"description":206,"slug":207,"parentId":149,"order":208,"_type":15,"_id":209,"_source":17,"_file":210,"_stem":211,"_extension":20},"/python-how-to/convert-lists-dictionaries","Convert Between Lists and Dictionaries","Learn how to transform data between lists and dictionaries in Python","convert-lists-dictionaries",22,"content:python-how-to:22.convert-lists-dictionaries.md","python-how-to/22.convert-lists-dictionaries.md","python-how-to/22.convert-lists-dictionaries",{"_path":213,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":214,"description":215,"slug":216,"order":217,"isParent":13,"icon":14,"_type":15,"_id":218,"_source":17,"_file":219,"_stem":220,"_extension":20,"children":221,"expanded":13},"/python-how-to/file-operations","File Operations","Learn essential file operations in Python for reading, writing, and managing files","file-operations",23,"content:python-how-to:23.file-operations.md","python-how-to/23.file-operations.md","python-how-to/23.file-operations",[222,231,240,249,258,267,276],{"_path":223,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":224,"description":225,"slug":226,"parentId":213,"order":227,"_type":15,"_id":228,"_source":17,"_file":229,"_stem":230,"_extension":20},"/python-how-to/read-text-files","Read Text Files","Learn how to read text files in Python using different methods","read-text-files",24,"content:python-how-to:24.read-text-files.md","python-how-to/24.read-text-files.md","python-how-to/24.read-text-files",{"_path":232,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":233,"description":234,"slug":235,"parentId":213,"order":236,"_type":15,"_id":237,"_source":17,"_file":238,"_stem":239,"_extension":20},"/python-how-to/write-to-files","Write to Files","Learn how to write and create files in Python using different methods","write-to-files",25,"content:python-how-to:25.write-to-files.md","python-how-to/25.write-to-files.md","python-how-to/25.write-to-files",{"_path":241,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":242,"description":243,"slug":244,"parentId":213,"order":245,"_type":15,"_id":246,"_source":17,"_file":247,"_stem":248,"_extension":20},"/python-how-to/work-csv-files","Work with CSV Files","Learn how to read and write CSV files in Python using the csv module","work-csv-files",26,"content:python-how-to:26.work-csv-files.md","python-how-to/26.work-csv-files.md","python-how-to/26.work-csv-files",{"_path":250,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":251,"description":252,"slug":253,"parentId":213,"order":254,"_type":15,"_id":255,"_source":17,"_file":256,"_stem":257,"_extension":20},"/python-how-to/handle-file-paths","Handle File Paths","Learn how to work with file and directory paths in Python using pathlib and os modules","handle-file-paths",27,"content:python-how-to:27.handle-file-paths.md","python-how-to/27.handle-file-paths.md","python-how-to/27.handle-file-paths",{"_path":259,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":260,"description":261,"slug":262,"parentId":213,"order":263,"_type":15,"_id":264,"_source":17,"_file":265,"_stem":266,"_extension":20},"/python-how-to/work-json-files","Work with JSON Files","Learn how to read and write JSON files in Python using the json module","work-json-files",28,"content:python-how-to:28.work-json-files.md","python-how-to/28.work-json-files.md","python-how-to/28.work-json-files",{"_path":268,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":269,"description":270,"slug":271,"parentId":213,"order":272,"_type":15,"_id":273,"_source":17,"_file":274,"_stem":275,"_extension":20},"/python-how-to/handle-binary-files","Handle Binary Files","Learn how to work with binary files in Python for images, data, and other non-text content","handle-binary-files",29,"content:python-how-to:29.handle-binary-files.md","python-how-to/29.handle-binary-files.md","python-how-to/29.handle-binary-files",{"_path":277,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":278,"description":279,"slug":280,"parentId":213,"order":281,"_type":15,"_id":282,"_source":17,"_file":283,"_stem":284,"_extension":20},"/python-how-to/use-context-managers","Use Context Managers","Learn how to use context managers for safe resource handling in Python","use-context-managers",30,"content:python-how-to:30.use-context-managers.md","python-how-to/30.use-context-managers.md","python-how-to/30.use-context-managers",{"_path":286,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":287,"description":288,"slug":289,"parentId":290,"order":291,"isParent":13,"icon":292,"_type":15,"_id":293,"_source":17,"_file":294,"_stem":295,"_extension":20,"children":296,"expanded":13},"/python-how-to/date-and-time","Date and Time","Master Python's date and time handling with datetime, time zones, formatting, and calculations","date-and-time","/python-how-to",31,"pi pi-calendar","content:python-how-to:31.date-and-time.md","python-how-to/31.date-and-time.md","python-how-to/31.date-and-time",[297,306,315,324,333,342],{"_path":298,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":299,"description":300,"slug":301,"parentId":286,"order":302,"_type":15,"_id":303,"_source":17,"_file":304,"_stem":305,"_extension":20},"/python-how-to/get-current-datetime","Get Current Date/Time","Learn how to get current date, time, and timestamps using Python's datetime module","get-current-datetime",32,"content:python-how-to:32.get-current-datetime.md","python-how-to/32.get-current-datetime.md","python-how-to/32.get-current-datetime",{"_path":307,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":308,"description":309,"slug":310,"parentId":286,"order":311,"_type":15,"_id":312,"_source":17,"_file":313,"_stem":314,"_extension":20},"/python-how-to/format-dates","Format Dates","Master date formatting with strftime, custom formats, and locale-aware formatting for user-friendly displays","format-dates",33,"content:python-how-to:33.format-dates.md","python-how-to/33.format-dates.md","python-how-to/33.format-dates",{"_path":316,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":317,"description":318,"slug":319,"parentId":286,"order":320,"_type":15,"_id":321,"_source":17,"_file":322,"_stem":323,"_extension":20},"/python-how-to/calculate-date-differences","Calculate Date Differences","Learn to calculate time differences, durations, and intervals using Python's timedelta for scheduling and analytics","calculate-date-differences",34,"content:python-how-to:34.calculate-date-differences.md","python-how-to/34.calculate-date-differences.md","python-how-to/34.calculate-date-differences",{"_path":325,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":326,"description":327,"slug":328,"parentId":286,"order":329,"_type":15,"_id":330,"_source":17,"_file":331,"_stem":332,"_extension":20},"/python-how-to/parse-date-strings","Parse Date Strings","Convert text dates into Python datetime objects using strptime, handle multiple formats, and validate date input","parse-date-strings",35,"content:python-how-to:35.parse-date-strings.md","python-how-to/35.parse-date-strings.md","python-how-to/35.parse-date-strings",{"_path":334,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":335,"description":336,"slug":337,"parentId":286,"order":338,"_type":15,"_id":339,"_source":17,"_file":340,"_stem":341,"_extension":20},"/python-how-to/handle-timezones","Handle Timezones","Master timezone handling with zoneinfo, UTC conversions, and timezone-aware datetime objects for global applications","handle-timezones",36,"content:python-how-to:36.handle-timezones.md","python-how-to/36.handle-timezones.md","python-how-to/36.handle-timezones",{"_path":343,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":344,"description":345,"slug":346,"parentId":286,"order":347,"_type":15,"_id":348,"_source":17,"_file":349,"_stem":350,"_extension":20},"/python-how-to/work-with-timestamps","Work with Timestamps","Master Unix timestamps in Python - convert between datetime objects and timestamps for APIs, databases, and system integration","work-with-timestamps",37,"content:python-how-to:37.work-with-timestamps.md","python-how-to/37.work-with-timestamps.md","python-how-to/37.work-with-timestamps",{"_path":352,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":353,"description":354,"slug":355,"parentId":290,"order":356,"isParent":13,"icon":357,"_type":15,"_id":358,"_source":17,"_file":359,"_stem":360,"_extension":20,"children":361,"expanded":13},"/python-how-to/error-handling","Error Handling","Learn Python's error handling with try/except, custom exceptions, debugging, logging, and retry logic for robust applications","error-handling",38,"pi pi-exclamation-triangle","content:python-how-to:38.error-handling.md","python-how-to/38.error-handling.md","python-how-to/38.error-handling",[362,371,380,389,398],{"_path":363,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":364,"description":365,"slug":366,"parentId":352,"order":367,"_type":15,"_id":368,"_source":17,"_file":369,"_stem":370,"_extension":20},"/python-how-to/handle-exceptions","Handle Exceptions","Master try/except blocks, multiple exception handling, and finally clauses for robust error handling in Python","handle-exceptions",39,"content:python-how-to:39.handle-exceptions.md","python-how-to/39.handle-exceptions.md","python-how-to/39.handle-exceptions",{"_path":372,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":373,"description":374,"slug":375,"parentId":352,"order":376,"_type":15,"_id":377,"_source":17,"_file":378,"_stem":379,"_extension":20},"/python-how-to/create-custom-exceptions","Create Custom Exceptions","Learn to create custom exception classes in Python for specific error handling and better code organization","create-custom-exceptions",40,"content:python-how-to:40.create-custom-exceptions.md","python-how-to/40.create-custom-exceptions.md","python-how-to/40.create-custom-exceptions",{"_path":381,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":382,"description":383,"slug":384,"parentId":352,"order":385,"_type":15,"_id":386,"_source":17,"_file":387,"_stem":388,"_extension":20},"/python-how-to/debug-code","Debug Code","Learn Python debugging techniques using print statements, the debugger, and tools to find and fix code issues","debug-code",41,"content:python-how-to:41.debug-code.md","python-how-to/41.debug-code.md","python-how-to/41.debug-code",{"_path":390,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":391,"description":392,"slug":393,"parentId":352,"order":394,"_type":15,"_id":395,"_source":17,"_file":396,"_stem":397,"_extension":20},"/python-how-to/use-logging","Use Logging","Learn Python's logging module for tracking application behavior, errors, and debugging information","use-logging",42,"content:python-how-to:42.use-logging.md","python-how-to/42.use-logging.md","python-how-to/42.use-logging",{"_path":399,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":400,"description":401,"slug":402,"parentId":352,"order":403,"_type":15,"_id":404,"_source":17,"_file":405,"_stem":406,"_extension":20},"/python-how-to/implement-retry-logic","Implement Retry Logic","Learn to implement retry mechanisms in Python for handling temporary failures and building resilient applications","implement-retry-logic",43,"content:python-how-to:43.implement-retry-logic.md","python-how-to/43.implement-retry-logic.md","python-how-to/43.implement-retry-logic",{"_path":408,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":409,"description":410,"slug":411,"parentId":290,"order":412,"isParent":13,"icon":413,"_type":15,"_id":414,"_source":17,"_file":415,"_stem":416,"_extension":20,"children":417,"expanded":13},"/python-how-to/functions-and-modules","Functions and Modules","Learn Python functions, modules, and code organization for building reusable, maintainable applications","functions-and-modules",44,"pi pi-box","content:python-how-to:44.functions-and-modules.md","python-how-to/44.functions-and-modules.md","python-how-to/44.functions-and-modules",[418,427,436,445,454,463],{"_path":419,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":420,"description":421,"slug":422,"parentId":408,"order":423,"_type":15,"_id":424,"_source":17,"_file":425,"_stem":426,"_extension":20},"/python-how-to/write-functions","Write Functions","Learn to create Python functions with parameters, return values, and documentation for reusable code","write-functions",45,"content:python-how-to:45.write-functions.md","python-how-to/45.write-functions.md","python-how-to/45.write-functions",{"_path":428,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":429,"description":430,"slug":431,"parentId":408,"order":432,"_type":15,"_id":433,"_source":17,"_file":434,"_stem":435,"_extension":20},"/python-how-to/use-args-kwargs","Use *args and **kwargs","Learn to use *args and **kwargs for flexible function arguments in Python","use-args-kwargs",46,"content:python-how-to:46.use-args-kwargs.md","python-how-to/46.use-args-kwargs.md","python-how-to/46.use-args-kwargs",{"_path":437,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":438,"description":439,"slug":440,"parentId":408,"order":441,"_type":15,"_id":442,"_source":17,"_file":443,"_stem":444,"_extension":20},"/python-how-to/create-decorators","Create Decorators","Learn to create and use Python decorators to enhance function behavior and add functionality","create-decorators",47,"content:python-how-to:47.create-decorators.md","python-how-to/47.create-decorators.md","python-how-to/47.create-decorators",{"_path":446,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":447,"description":448,"slug":449,"parentId":408,"order":450,"_type":15,"_id":451,"_source":17,"_file":452,"_stem":453,"_extension":20},"/python-how-to/use-generators","Use Generators","Learn to create memory-efficient generators with yield for processing large datasets and sequences","use-generators",48,"content:python-how-to:48.use-generators.md","python-how-to/48.use-generators.md","python-how-to/48.use-generators",{"_path":455,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":456,"description":457,"slug":458,"parentId":408,"order":459,"_type":15,"_id":460,"_source":17,"_file":461,"_stem":462,"_extension":20},"/python-how-to/work-modules-packages","Work with Modules and Packages","Learn to organize Python code with modules and packages, and use imports effectively","work-modules-packages",49,"content:python-how-to:49.work-modules-packages.md","python-how-to/49.work-modules-packages.md","python-how-to/49.work-modules-packages",{"_path":464,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":465,"description":466,"slug":467,"parentId":408,"order":468,"_type":15,"_id":469,"_source":17,"_file":470,"_stem":471,"_extension":20},"/python-how-to/create-virtual-environments","Create Virtual Environments","Learn to create and manage Python virtual environments for project dependency isolation","create-virtual-environments",50,"content:python-how-to:50.create-virtual-environments.md","python-how-to/50.create-virtual-environments.md","python-how-to/50.create-virtual-environments",{"_path":473,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":474,"description":475,"slug":476,"parentId":290,"order":477,"isParent":13,"icon":478,"_type":15,"_id":479,"_source":17,"_file":480,"_stem":481,"_extension":20,"children":482,"expanded":13},"/python-how-to/data-processing","Data Processing","Learn Python data processing techniques including regex, APIs, databases, and large file handling","data-processing",51,"pi pi-database","content:python-how-to:51.data-processing.md","python-how-to/51.data-processing.md","python-how-to/51.data-processing",[483,492,501,510,519],{"_path":484,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":485,"description":486,"slug":487,"parentId":473,"order":488,"_type":15,"_id":489,"_source":17,"_file":490,"_stem":491,"_extension":20},"/python-how-to/work-regular-expressions","Work with Regular Expressions","Learn to use Python's re module for pattern matching, text extraction, and data validation","work-regular-expressions",52,"content:python-how-to:52.work-regular-expressions.md","python-how-to/52.work-regular-expressions.md","python-how-to/52.work-regular-expressions",{"_path":493,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":494,"description":495,"slug":496,"parentId":473,"order":497,"_type":15,"_id":498,"_source":17,"_file":499,"_stem":500,"_extension":20},"/python-how-to/parse-xml-html","Parse XML and HTML","Learn to extract data from XML and HTML documents using Python's built-in parsing tools","parse-xml-html",53,"content:python-how-to:53.parse-xml-html.md","python-how-to/53.parse-xml-html.md","python-how-to/53.parse-xml-html",{"_path":502,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":503,"description":504,"slug":505,"parentId":473,"order":506,"_type":15,"_id":507,"_source":17,"_file":508,"_stem":509,"_extension":20},"/python-how-to/handle-api-requests","Handle API Requests","Learn to fetch and process data from web APIs using Python's urllib and external requests library","handle-api-requests",54,"content:python-how-to:54.handle-api-requests.md","python-how-to/54.handle-api-requests.md","python-how-to/54.handle-api-requests",{"_path":511,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":512,"description":513,"slug":514,"parentId":473,"order":515,"_type":15,"_id":516,"_source":17,"_file":517,"_stem":518,"_extension":20},"/python-how-to/work-databases","Work with Databases","Learn to connect to and query SQL databases using Python's sqlite3 and database techniques","work-databases",55,"content:python-how-to:55.work-databases.md","python-how-to/55.work-databases.md","python-how-to/55.work-databases",{"_path":520,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":521,"description":522,"slug":523,"parentId":473,"order":524,"_type":15,"_id":525,"_source":17,"_file":526,"_stem":527,"_extension":20},"/python-how-to/process-large-files","Process Large Files","Learn memory-efficient techniques for handling large files and datasets in Python","process-large-files",56,"content:python-how-to:56.process-large-files.md","python-how-to/56.process-large-files.md","python-how-to/56.process-large-files",{"_path":529,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":530,"description":531,"slug":532,"parentId":290,"order":533,"isParent":13,"icon":534,"_type":15,"_id":535,"_source":17,"_file":536,"_stem":537,"_extension":20,"children":538,"expanded":13},"/python-how-to/best-practices","Best Practices","Learn Python best practices for writing clean, maintainable, and efficient code","best-practices",57,"pi pi-star","content:python-how-to:57.best-practices.md","python-how-to/57.best-practices.md","python-how-to/57.best-practices",[539,548,557,566,575,584],{"_path":540,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":541,"description":542,"slug":543,"parentId":529,"order":544,"_type":15,"_id":545,"_source":17,"_file":546,"_stem":547,"_extension":20},"/python-how-to/structure-code","Structure Your Code","Learn to organize Python code with proper module structure, functions, and classes","structure-code",58,"content:python-how-to:58.structure-code.md","python-how-to/58.structure-code.md","python-how-to/58.structure-code",{"_path":549,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":550,"description":551,"slug":552,"parentId":529,"order":553,"_type":15,"_id":554,"_source":17,"_file":555,"_stem":556,"_extension":20},"/python-how-to/write-clean-code","Write Clean Code","Learn to write readable, maintainable Python code with proper naming, comments, and clear logic","write-clean-code",59,"content:python-how-to:59.write-clean-code.md","python-how-to/59.write-clean-code.md","python-how-to/59.write-clean-code",{"_path":558,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":559,"description":560,"slug":561,"parentId":529,"order":562,"_type":15,"_id":563,"_source":17,"_file":564,"_stem":565,"_extension":20},"/python-how-to/optimize-performance","Optimize Performance","Learn to identify and fix performance bottlenecks in Python code for faster execution","optimize-performance",60,"content:python-how-to:60.optimize-performance.md","python-how-to/60.optimize-performance.md","python-how-to/60.optimize-performance",{"_path":567,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":568,"description":569,"slug":570,"parentId":529,"order":571,"_type":15,"_id":572,"_source":17,"_file":573,"_stem":574,"_extension":20},"/python-how-to/write-unit-tests","Write Unit Tests","Learn to create reliable unit tests to verify your Python code works correctly and catch bugs early","write-unit-tests",61,"content:python-how-to:61.write-unit-tests.md","python-how-to/61.write-unit-tests.md","python-how-to/61.write-unit-tests",{"_path":576,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":577,"description":578,"slug":579,"parentId":529,"order":580,"_type":15,"_id":581,"_source":17,"_file":582,"_stem":583,"_extension":20},"/python-how-to/document-code","Document Your Code","Learn to write clear documentation and helpful comments for your Python code","document-code",62,"content:python-how-to:62.document-code.md","python-how-to/62.document-code.md","python-how-to/62.document-code",{"_path":585,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":586,"description":587,"slug":588,"parentId":529,"order":589,"_type":15,"_id":590,"_source":17,"_file":591,"_stem":592,"_extension":20},"/python-how-to/use-type-hints","Use Type Hints","Learn to add type annotations to Python code for better clarity, tooling support, and error detection","use-type-hints",63,"content:python-how-to:63.use-type-hints.md","python-how-to/63.use-type-hints.md","python-how-to/63.use-type-hints",{"_path":290,"_dir":8,"_draft":7,"_partial":7,"_locale":8,"title":594,"description":595,"slug":6,"order":596,"icon":14,"_type":15,"_id":597,"_source":17,"_file":598,"_stem":599,"_extension":20,"expanded":13},"Python How-To Guide","Practical Python tutorials for common programming tasks. Learn step-by-step solutions for string manipulation, file operations, data processing, and more with real-world examples.",0,"content:python-how-to:index.md","python-how-to/index.md","python-how-to/index",[575],{"_path":576,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":577,"description":578,"slug":579,"parentId":529,"order":580,"body":602,"_type":15,"_id":581,"_source":17,"_file":582,"_stem":583,"_extension":20},{"type":603,"children":604,"toc":9822},"root",[605,614,620,5139,5146,5151,5280,5287,9466,9472,9643,9649,9791,9797,9802,9816],{"type":606,"tag":607,"props":608,"children":610},"element","h1",{"id":609},"document-your-code",[611],{"type":612,"value":613},"text","📖 Document Your Code",{"type":606,"tag":615,"props":616,"children":617},"p",{},[618],{"type":612,"value":619},"Good documentation explains what your code does, why it exists, and how to use it. Clear documentation makes your code easier to understand, maintain, and use by others (including your future self).",{"type":606,"tag":621,"props":622,"children":623},"code-try",{},[624],{"type":606,"tag":625,"props":626,"children":630},"pre",{"className":627,"code":628,"language":629,"meta":8,"style":8},"language-python shiki shiki-themes github-light github-dark","\"\"\"\nshopping_cart.py - A simple shopping cart implementation\n\nThis module provides a basic shopping cart system for an e-commerce application.\nIt handles adding items, calculating totals, and applying discounts.\n\nExample usage:\n    cart = ShoppingCart()\n    cart.add_item(\"laptop\", 999.99, 1)\n    cart.add_item(\"mouse\", 25.50, 2)\n    total = cart.get_total()\n\"\"\"\n\nfrom typing import List, Dict, Optional\nfrom datetime import datetime\n\n\nclass ShoppingCart:\n    \"\"\"\n    A shopping cart that manages items and calculates totals.\n    \n    The cart stores items with their prices and quantities, and provides\n    methods to calculate totals, apply discounts, and manage the cart contents.\n    \n    Attributes:\n        items (List[Dict]): List of items in the cart\n        discount_rate (float): Discount rate as decimal (0.1 = 10%)\n        \n    Example:\n        >>> cart = ShoppingCart()\n        >>> cart.add_item(\"book\", 19.99, 2)\n        >>> cart.get_total()\n        39.98\n    \"\"\"\n    \n    def __init__(self, discount_rate: float = 0.0):\n        \"\"\"\n        Initialize a new shopping cart.\n        \n        Args:\n            discount_rate (float): Discount rate as decimal (default: 0.0)\n            \n        Raises:\n            ValueError: If discount_rate is negative or greater than 1.0\n        \"\"\"\n        if discount_rate \u003C 0 or discount_rate > 1.0:\n            raise ValueError(\"Discount rate must be between 0.0 and 1.0\")\n            \n        self.items: List[Dict] = []\n        self.discount_rate = discount_rate\n        self.created_at = datetime.now()\n    \n    def add_item(self, name: str, price: float, quantity: int = 1) -> None:\n        \"\"\"\n        Add an item to the shopping cart.\n        \n        Args:\n            name (str): Name of the item\n            price (float): Price per unit\n            quantity (int): Number of items to add (default: 1)\n            \n        Raises:\n            ValueError: If price is negative or quantity is not positive\n            \n        Example:\n            >>> cart.add_item(\"laptop\", 999.99, 1)\n            >>> len(cart.items)\n            1\n        \"\"\"\n        if price \u003C 0:\n            raise ValueError(\"Price cannot be negative\")\n        if quantity \u003C= 0:\n            raise ValueError(\"Quantity must be positive\")\n        \n        # Check if item already exists in cart\n        for item in self.items:\n            if item['name'] == name and item['price'] == price:\n                item['quantity'] += quantity\n                return\n        \n        # Add new item to cart\n        item = {\n            'name': name,\n            'price': price,\n            'quantity': quantity,\n            'added_at': datetime.now()\n        }\n        self.items.append(item)\n    \n    def remove_item(self, name: str) -> bool:\n        \"\"\"\n        Remove an item from the cart by name.\n        \n        Args:\n            name (str): Name of the item to remove\n            \n        Returns:\n            bool: True if item was found and removed, False otherwise\n            \n        Example:\n            >>> cart.add_item(\"book\", 19.99)\n            >>> cart.remove_item(\"book\")\n            True\n            >>> cart.remove_item(\"nonexistent\")\n            False\n        \"\"\"\n        for i, item in enumerate(self.items):\n            if item['name'] == name:\n                del self.items[i]\n                return True\n        return False\n    \n    def get_subtotal(self) -> float:\n        \"\"\"\n        Calculate the subtotal before discount.\n        \n        Returns:\n            float: Total price of all items before discount\n            \n        Example:\n            >>> cart.add_item(\"book\", 10.00, 2)\n            >>> cart.get_subtotal()\n            20.0\n        \"\"\"\n        return sum(item['price'] * item['quantity'] for item in self.items)\n    \n    def get_total(self) -> float:\n        \"\"\"\n        Calculate the final total after applying discount.\n        \n        Returns:\n            float: Final total after discount, rounded to 2 decimal places\n            \n        Example:\n            >>> cart = ShoppingCart(discount_rate=0.1)  # 10% discount\n            >>> cart.add_item(\"item\", 100.00)\n            >>> cart.get_total()\n            90.0\n        \"\"\"\n        subtotal = self.get_subtotal()\n        discount_amount = subtotal * self.discount_rate\n        final_total = subtotal - discount_amount\n        return round(final_total, 2)\n    \n    def get_item_count(self) -> int:\n        \"\"\"\n        Get the total number of items in the cart.\n        \n        Returns:\n            int: Total quantity of all items\n            \n        Note:\n            This counts individual items, not unique products.\n            For example, 3 books and 2 pens = 5 items total.\n        \"\"\"\n        return sum(item['quantity'] for item in self.items)\n    \n    def is_empty(self) -> bool:\n        \"\"\"\n        Check if the cart is empty.\n        \n        Returns:\n            bool: True if cart has no items, False otherwise\n        \"\"\"\n        return len(self.items) == 0\n    \n    def clear(self) -> None:\n        \"\"\"\n        Remove all items from the cart.\n        \n        Warning:\n            This action cannot be undone. All items will be permanently\n            removed from the cart.\n        \"\"\"\n        self.items.clear()\n\n\ndef calculate_shipping_cost(total_weight: float, distance: float) -> float:\n    \"\"\"\n    Calculate shipping cost based on weight and distance.\n    \n    The shipping cost is calculated using a base rate plus weight and\n    distance charges. Free shipping applies for orders over certain weight.\n    \n    Args:\n        total_weight (float): Total weight in kg\n        distance (float): Shipping distance in km\n        \n    Returns:\n        float: Shipping cost in dollars\n        \n    Raises:\n        ValueError: If weight or distance is negative\n        \n    Note:\n        Free shipping applies for orders over 10kg.\n        \n    Example:\n        >>> calculate_shipping_cost(2.5, 100)  # 2.5kg, 100km\n        12.5\n        >>> calculate_shipping_cost(15, 50)     # Free shipping\n        0.0\n    \"\"\"\n    if total_weight \u003C 0 or distance \u003C 0:\n        raise ValueError(\"Weight and distance must be non-negative\")\n    \n    # Free shipping for heavy orders\n    if total_weight > 10:\n        return 0.0\n    \n    # Calculate shipping cost\n    base_rate = 5.00\n    weight_rate = total_weight * 1.50  # $1.50 per kg\n    distance_rate = distance * 0.05    # $0.05 per km\n    \n    total_cost = base_rate + weight_rate + distance_rate\n    return round(total_cost, 2)\n\n\ndef format_order_summary(cart: ShoppingCart, customer_name: str) -> str:\n    \"\"\"\n    Generate a formatted order summary for display or printing.\n    \n    Args:\n        cart (ShoppingCart): The shopping cart to summarize\n        customer_name (str): Name of the customer\n        \n    Returns:\n        str: Formatted order summary as a multi-line string\n        \n    Example:\n        >>> cart = ShoppingCart()\n        >>> cart.add_item(\"Book\", 19.99, 2)\n        >>> summary = format_order_summary(cart, \"Alice\")\n        >>> print(summary)\n        Order Summary for Alice\n        =======================\n        - Book x2: $39.98\n        \n        Subtotal: $39.98\n        Total: $39.98\n    \"\"\"\n    # Build the summary string\n    lines = [\n        f\"Order Summary for {customer_name}\",\n        \"=\" * (len(customer_name) + 17),  # Adjust line length\n        \"\"\n    ]\n    \n    # Add each item\n    for item in cart.items:\n        item_total = item['price'] * item['quantity']\n        line = f\"- {item['name']} x{item['quantity']}: ${item_total:.2f}\"\n        lines.append(line)\n    \n    # Add totals\n    lines.extend([\n        \"\",\n        f\"Subtotal: ${cart.get_subtotal():.2f}\",\n        f\"Total: ${cart.get_total():.2f}\"\n    ])\n    \n    return \"\\n\".join(lines)\n\n\n# Example usage with detailed comments\ndef demonstrate_shopping_cart():\n    \"\"\"\n    Demonstrate the shopping cart functionality.\n    \n    This function shows how to use the ShoppingCart class and related\n    functions to create a complete shopping experience.\n    \"\"\"\n    print(\"Shopping Cart Documentation Example\")\n    print(\"=\" * 40)\n    \n    # Create a cart with 10% discount\n    cart = ShoppingCart(discount_rate=0.10)\n    \n    # Add some items to the cart\n    cart.add_item(\"Programming Book\", 45.99, 1)\n    cart.add_item(\"Wireless Mouse\", 29.95, 2)\n    cart.add_item(\"USB Cable\", 12.50, 3)\n    \n    # Display cart information\n    print(f\"Items in cart: {cart.get_item_count()}\")\n    print(f\"Subtotal: ${cart.get_subtotal():.2f}\")\n    print(f\"Total after discount: ${cart.get_total():.2f}\")\n    print(f\"Cart empty: {cart.is_empty()}\")\n    \n    # Calculate shipping\n    total_weight = 2.8  # kg\n    shipping_distance = 150  # km\n    shipping_cost = calculate_shipping_cost(total_weight, shipping_distance)\n    print(f\"Shipping cost: ${shipping_cost:.2f}\")\n    \n    # Generate order summary\n    summary = format_order_summary(cart, \"John Doe\")\n    print(\"\\n\" + summary)\n    \n    # Remove an item\n    if cart.remove_item(\"USB Cable\"):\n        print(f\"\\nAfter removing USB Cable:\")\n        print(f\"New total: ${cart.get_total():.2f}\")\n\n\nif __name__ == \"__main__\":\n    # This block runs only when the script is executed directly,\n    # not when imported as a module\n    demonstrate_shopping_cart()\n","python",[631],{"type":606,"tag":632,"props":633,"children":634},"code",{"__ignoreMap":8},[635,646,654,662,670,678,685,693,701,710,718,726,733,740,765,786,793,800,819,827,835,843,851,859,866,874,882,890,898,906,919,931,943,951,958,965,1004,1012,1020,1027,1035,1043,1051,1059,1067,1074,1120,1148,1155,1178,1199,1220,1227,1291,1298,1306,1313,1320,1328,1336,1344,1351,1358,1366,1374,1383,1397,1410,1419,1427,1452,1477,1503,1528,1536,1546,1575,1636,1664,1673,1681,1690,1708,1722,1736,1750,1764,1773,1786,1794,1828,1836,1845,1853,1861,1870,1878,1887,1896,1904,1912,1925,1938,1947,1960,1969,1977,2013,2042,2060,2074,2088,2096,2122,2130,2139,2147,2155,2164,2172,2180,2193,2206,2215,2223,2288,2296,2321,2329,2338,2346,2354,2363,2371,2379,2392,2405,2417,2426,2434,2456,2487,2514,2541,2549,2574,2582,2591,2599,2607,2616,2624,2633,2642,2651,2659,2703,2711,2736,2744,2753,2761,2769,2778,2786,2821,2829,2854,2862,2871,2879,2888,2897,2906,2914,2927,2935,2943,2987,2995,3004,3012,3021,3030,3038,3047,3056,3065,3073,3082,3091,3099,3108,3117,3125,3134,3143,3151,3159,3172,3181,3194,3203,3211,3254,3280,3288,3297,3322,3335,3343,3352,3370,3401,3432,3440,3477,3503,3511,3519,3553,3561,3570,3578,3586,3595,3604,3612,3620,3629,3637,3645,3657,3670,3683,3696,3705,3714,3723,3731,3740,3749,3757,3766,3784,3823,3871,3880,3889,3897,3906,3928,3970,4068,4077,4085,4094,4103,4116,4154,4188,4197,4205,4232,4240,4248,4257,4275,4283,4292,4300,4309,4318,4326,4348,4378,4386,4395,4432,4440,4449,4486,4520,4555,4563,4572,4615,4659,4704,4746,4754,4763,4786,4809,4827,4873,4881,4890,4917,4951,4959,4968,4989,5023,5068,5076,5084,5112,5121,5130],{"type":606,"tag":636,"props":637,"children":639},"span",{"class":638,"line":12},"line",[640],{"type":606,"tag":636,"props":641,"children":643},{"style":642},"--shiki-default:#032F62;--shiki-app-dark-mode:#9ECBFF",[644],{"type":612,"value":645},"\"\"\"\n",{"type":606,"tag":636,"props":647,"children":648},{"class":638,"line":27},[649],{"type":606,"tag":636,"props":650,"children":651},{"style":642},[652],{"type":612,"value":653},"shopping_cart.py - A simple shopping cart implementation\n",{"type":606,"tag":636,"props":655,"children":656},{"class":638,"line":36},[657],{"type":606,"tag":636,"props":658,"children":659},{"emptyLinePlaceholder":13},[660],{"type":612,"value":661},"\n",{"type":606,"tag":636,"props":663,"children":664},{"class":638,"line":45},[665],{"type":606,"tag":636,"props":666,"children":667},{"style":642},[668],{"type":612,"value":669},"This module provides a basic shopping cart system for an e-commerce application.\n",{"type":606,"tag":636,"props":671,"children":672},{"class":638,"line":54},[673],{"type":606,"tag":636,"props":674,"children":675},{"style":642},[676],{"type":612,"value":677},"It handles adding items, calculating totals, and applying discounts.\n",{"type":606,"tag":636,"props":679,"children":680},{"class":638,"line":63},[681],{"type":606,"tag":636,"props":682,"children":683},{"emptyLinePlaceholder":13},[684],{"type":612,"value":661},{"type":606,"tag":636,"props":686,"children":687},{"class":638,"line":72},[688],{"type":606,"tag":636,"props":689,"children":690},{"style":642},[691],{"type":612,"value":692},"Example usage:\n",{"type":606,"tag":636,"props":694,"children":695},{"class":638,"line":81},[696],{"type":606,"tag":636,"props":697,"children":698},{"style":642},[699],{"type":612,"value":700},"    cart = ShoppingCart()\n",{"type":606,"tag":636,"props":702,"children":704},{"class":638,"line":703},9,[705],{"type":606,"tag":636,"props":706,"children":707},{"style":642},[708],{"type":612,"value":709},"    cart.add_item(\"laptop\", 999.99, 1)\n",{"type":606,"tag":636,"props":711,"children":712},{"class":638,"line":99},[713],{"type":606,"tag":636,"props":714,"children":715},{"style":642},[716],{"type":612,"value":717},"    cart.add_item(\"mouse\", 25.50, 2)\n",{"type":606,"tag":636,"props":719,"children":720},{"class":638,"line":108},[721],{"type":606,"tag":636,"props":722,"children":723},{"style":642},[724],{"type":612,"value":725},"    total = cart.get_total()\n",{"type":606,"tag":636,"props":727,"children":728},{"class":638,"line":117},[729],{"type":606,"tag":636,"props":730,"children":731},{"style":642},[732],{"type":612,"value":645},{"type":606,"tag":636,"props":734,"children":735},{"class":638,"line":126},[736],{"type":606,"tag":636,"props":737,"children":738},{"emptyLinePlaceholder":13},[739],{"type":612,"value":661},{"type":606,"tag":636,"props":741,"children":742},{"class":638,"line":135},[743,749,755,760],{"type":606,"tag":636,"props":744,"children":746},{"style":745},"--shiki-default:#D73A49;--shiki-app-dark-mode:#F97583",[747],{"type":612,"value":748},"from",{"type":606,"tag":636,"props":750,"children":752},{"style":751},"--shiki-default:#24292E;--shiki-app-dark-mode:#E1E4E8",[753],{"type":612,"value":754}," typing ",{"type":606,"tag":636,"props":756,"children":757},{"style":745},[758],{"type":612,"value":759},"import",{"type":606,"tag":636,"props":761,"children":762},{"style":751},[763],{"type":612,"value":764}," List, Dict, Optional\n",{"type":606,"tag":636,"props":766,"children":767},{"class":638,"line":144},[768,772,777,781],{"type":606,"tag":636,"props":769,"children":770},{"style":745},[771],{"type":612,"value":748},{"type":606,"tag":636,"props":773,"children":774},{"style":751},[775],{"type":612,"value":776}," datetime ",{"type":606,"tag":636,"props":778,"children":779},{"style":745},[780],{"type":612,"value":759},{"type":606,"tag":636,"props":782,"children":783},{"style":751},[784],{"type":612,"value":785}," datetime\n",{"type":606,"tag":636,"props":787,"children":788},{"class":638,"line":153},[789],{"type":606,"tag":636,"props":790,"children":791},{"emptyLinePlaceholder":13},[792],{"type":612,"value":661},{"type":606,"tag":636,"props":794,"children":795},{"class":638,"line":163},[796],{"type":606,"tag":636,"props":797,"children":798},{"emptyLinePlaceholder":13},[799],{"type":612,"value":661},{"type":606,"tag":636,"props":801,"children":802},{"class":638,"line":172},[803,808,814],{"type":606,"tag":636,"props":804,"children":805},{"style":745},[806],{"type":612,"value":807},"class",{"type":606,"tag":636,"props":809,"children":811},{"style":810},"--shiki-default:#6F42C1;--shiki-app-dark-mode:#B392F0",[812],{"type":612,"value":813}," ShoppingCart",{"type":606,"tag":636,"props":815,"children":816},{"style":751},[817],{"type":612,"value":818},":\n",{"type":606,"tag":636,"props":820,"children":821},{"class":638,"line":181},[822],{"type":606,"tag":636,"props":823,"children":824},{"style":642},[825],{"type":612,"value":826},"    \"\"\"\n",{"type":606,"tag":636,"props":828,"children":829},{"class":638,"line":190},[830],{"type":606,"tag":636,"props":831,"children":832},{"style":642},[833],{"type":612,"value":834},"    A shopping cart that manages items and calculates totals.\n",{"type":606,"tag":636,"props":836,"children":837},{"class":638,"line":199},[838],{"type":606,"tag":636,"props":839,"children":840},{"style":642},[841],{"type":612,"value":842},"    \n",{"type":606,"tag":636,"props":844,"children":845},{"class":638,"line":208},[846],{"type":606,"tag":636,"props":847,"children":848},{"style":642},[849],{"type":612,"value":850},"    The cart stores items with their prices and quantities, and provides\n",{"type":606,"tag":636,"props":852,"children":853},{"class":638,"line":217},[854],{"type":606,"tag":636,"props":855,"children":856},{"style":642},[857],{"type":612,"value":858},"    methods to calculate totals, apply discounts, and manage the cart contents.\n",{"type":606,"tag":636,"props":860,"children":861},{"class":638,"line":227},[862],{"type":606,"tag":636,"props":863,"children":864},{"style":642},[865],{"type":612,"value":842},{"type":606,"tag":636,"props":867,"children":868},{"class":638,"line":236},[869],{"type":606,"tag":636,"props":870,"children":871},{"style":642},[872],{"type":612,"value":873},"    Attributes:\n",{"type":606,"tag":636,"props":875,"children":876},{"class":638,"line":245},[877],{"type":606,"tag":636,"props":878,"children":879},{"style":642},[880],{"type":612,"value":881},"        items (List[Dict]): List of items in the cart\n",{"type":606,"tag":636,"props":883,"children":884},{"class":638,"line":254},[885],{"type":606,"tag":636,"props":886,"children":887},{"style":642},[888],{"type":612,"value":889},"        discount_rate (float): Discount rate as decimal (0.1 = 10%)\n",{"type":606,"tag":636,"props":891,"children":892},{"class":638,"line":263},[893],{"type":606,"tag":636,"props":894,"children":895},{"style":642},[896],{"type":612,"value":897},"        \n",{"type":606,"tag":636,"props":899,"children":900},{"class":638,"line":272},[901],{"type":606,"tag":636,"props":902,"children":903},{"style":642},[904],{"type":612,"value":905},"    Example:\n",{"type":606,"tag":636,"props":907,"children":908},{"class":638,"line":281},[909,914],{"type":606,"tag":636,"props":910,"children":911},{"style":745},[912],{"type":612,"value":913},"        >>> ",{"type":606,"tag":636,"props":915,"children":916},{"style":642},[917],{"type":612,"value":918},"cart = ShoppingCart()\n",{"type":606,"tag":636,"props":920,"children":921},{"class":638,"line":291},[922,926],{"type":606,"tag":636,"props":923,"children":924},{"style":745},[925],{"type":612,"value":913},{"type":606,"tag":636,"props":927,"children":928},{"style":642},[929],{"type":612,"value":930},"cart.add_item(\"book\", 19.99, 2)\n",{"type":606,"tag":636,"props":932,"children":933},{"class":638,"line":302},[934,938],{"type":606,"tag":636,"props":935,"children":936},{"style":745},[937],{"type":612,"value":913},{"type":606,"tag":636,"props":939,"children":940},{"style":642},[941],{"type":612,"value":942},"cart.get_total()\n",{"type":606,"tag":636,"props":944,"children":945},{"class":638,"line":311},[946],{"type":606,"tag":636,"props":947,"children":948},{"style":642},[949],{"type":612,"value":950},"        39.98\n",{"type":606,"tag":636,"props":952,"children":953},{"class":638,"line":320},[954],{"type":606,"tag":636,"props":955,"children":956},{"style":642},[957],{"type":612,"value":826},{"type":606,"tag":636,"props":959,"children":960},{"class":638,"line":329},[961],{"type":606,"tag":636,"props":962,"children":963},{"style":751},[964],{"type":612,"value":842},{"type":606,"tag":636,"props":966,"children":967},{"class":638,"line":338},[968,973,979,984,989,994,999],{"type":606,"tag":636,"props":969,"children":970},{"style":745},[971],{"type":612,"value":972},"    def",{"type":606,"tag":636,"props":974,"children":976},{"style":975},"--shiki-default:#005CC5;--shiki-app-dark-mode:#79B8FF",[977],{"type":612,"value":978}," __init__",{"type":606,"tag":636,"props":980,"children":981},{"style":751},[982],{"type":612,"value":983},"(self, discount_rate: ",{"type":606,"tag":636,"props":985,"children":986},{"style":975},[987],{"type":612,"value":988},"float",{"type":606,"tag":636,"props":990,"children":991},{"style":745},[992],{"type":612,"value":993}," =",{"type":606,"tag":636,"props":995,"children":996},{"style":975},[997],{"type":612,"value":998}," 0.0",{"type":606,"tag":636,"props":1000,"children":1001},{"style":751},[1002],{"type":612,"value":1003},"):\n",{"type":606,"tag":636,"props":1005,"children":1006},{"class":638,"line":347},[1007],{"type":606,"tag":636,"props":1008,"children":1009},{"style":642},[1010],{"type":612,"value":1011},"        \"\"\"\n",{"type":606,"tag":636,"props":1013,"children":1014},{"class":638,"line":356},[1015],{"type":606,"tag":636,"props":1016,"children":1017},{"style":642},[1018],{"type":612,"value":1019},"        Initialize a new shopping cart.\n",{"type":606,"tag":636,"props":1021,"children":1022},{"class":638,"line":367},[1023],{"type":606,"tag":636,"props":1024,"children":1025},{"style":642},[1026],{"type":612,"value":897},{"type":606,"tag":636,"props":1028,"children":1029},{"class":638,"line":376},[1030],{"type":606,"tag":636,"props":1031,"children":1032},{"style":642},[1033],{"type":612,"value":1034},"        Args:\n",{"type":606,"tag":636,"props":1036,"children":1037},{"class":638,"line":385},[1038],{"type":606,"tag":636,"props":1039,"children":1040},{"style":642},[1041],{"type":612,"value":1042},"            discount_rate (float): Discount rate as decimal (default: 0.0)\n",{"type":606,"tag":636,"props":1044,"children":1045},{"class":638,"line":394},[1046],{"type":606,"tag":636,"props":1047,"children":1048},{"style":642},[1049],{"type":612,"value":1050},"            \n",{"type":606,"tag":636,"props":1052,"children":1053},{"class":638,"line":403},[1054],{"type":606,"tag":636,"props":1055,"children":1056},{"style":642},[1057],{"type":612,"value":1058},"        Raises:\n",{"type":606,"tag":636,"props":1060,"children":1061},{"class":638,"line":412},[1062],{"type":606,"tag":636,"props":1063,"children":1064},{"style":642},[1065],{"type":612,"value":1066},"            ValueError: If discount_rate is negative or greater than 1.0\n",{"type":606,"tag":636,"props":1068,"children":1069},{"class":638,"line":423},[1070],{"type":606,"tag":636,"props":1071,"children":1072},{"style":642},[1073],{"type":612,"value":1011},{"type":606,"tag":636,"props":1075,"children":1076},{"class":638,"line":432},[1077,1082,1087,1092,1097,1102,1106,1111,1116],{"type":606,"tag":636,"props":1078,"children":1079},{"style":745},[1080],{"type":612,"value":1081},"        if",{"type":606,"tag":636,"props":1083,"children":1084},{"style":751},[1085],{"type":612,"value":1086}," discount_rate ",{"type":606,"tag":636,"props":1088,"children":1089},{"style":745},[1090],{"type":612,"value":1091},"\u003C",{"type":606,"tag":636,"props":1093,"children":1094},{"style":975},[1095],{"type":612,"value":1096}," 0",{"type":606,"tag":636,"props":1098,"children":1099},{"style":745},[1100],{"type":612,"value":1101}," or",{"type":606,"tag":636,"props":1103,"children":1104},{"style":751},[1105],{"type":612,"value":1086},{"type":606,"tag":636,"props":1107,"children":1108},{"style":745},[1109],{"type":612,"value":1110},">",{"type":606,"tag":636,"props":1112,"children":1113},{"style":975},[1114],{"type":612,"value":1115}," 1.0",{"type":606,"tag":636,"props":1117,"children":1118},{"style":751},[1119],{"type":612,"value":818},{"type":606,"tag":636,"props":1121,"children":1122},{"class":638,"line":441},[1123,1128,1133,1138,1143],{"type":606,"tag":636,"props":1124,"children":1125},{"style":745},[1126],{"type":612,"value":1127},"            raise",{"type":606,"tag":636,"props":1129,"children":1130},{"style":975},[1131],{"type":612,"value":1132}," ValueError",{"type":606,"tag":636,"props":1134,"children":1135},{"style":751},[1136],{"type":612,"value":1137},"(",{"type":606,"tag":636,"props":1139,"children":1140},{"style":642},[1141],{"type":612,"value":1142},"\"Discount rate must be between 0.0 and 1.0\"",{"type":606,"tag":636,"props":1144,"children":1145},{"style":751},[1146],{"type":612,"value":1147},")\n",{"type":606,"tag":636,"props":1149,"children":1150},{"class":638,"line":450},[1151],{"type":606,"tag":636,"props":1152,"children":1153},{"style":751},[1154],{"type":612,"value":1050},{"type":606,"tag":636,"props":1156,"children":1157},{"class":638,"line":459},[1158,1163,1168,1173],{"type":606,"tag":636,"props":1159,"children":1160},{"style":975},[1161],{"type":612,"value":1162},"        self",{"type":606,"tag":636,"props":1164,"children":1165},{"style":751},[1166],{"type":612,"value":1167},".items: List[Dict] ",{"type":606,"tag":636,"props":1169,"children":1170},{"style":745},[1171],{"type":612,"value":1172},"=",{"type":606,"tag":636,"props":1174,"children":1175},{"style":751},[1176],{"type":612,"value":1177}," []\n",{"type":606,"tag":636,"props":1179,"children":1180},{"class":638,"line":468},[1181,1185,1190,1194],{"type":606,"tag":636,"props":1182,"children":1183},{"style":975},[1184],{"type":612,"value":1162},{"type":606,"tag":636,"props":1186,"children":1187},{"style":751},[1188],{"type":612,"value":1189},".discount_rate ",{"type":606,"tag":636,"props":1191,"children":1192},{"style":745},[1193],{"type":612,"value":1172},{"type":606,"tag":636,"props":1195,"children":1196},{"style":751},[1197],{"type":612,"value":1198}," discount_rate\n",{"type":606,"tag":636,"props":1200,"children":1201},{"class":638,"line":477},[1202,1206,1211,1215],{"type":606,"tag":636,"props":1203,"children":1204},{"style":975},[1205],{"type":612,"value":1162},{"type":606,"tag":636,"props":1207,"children":1208},{"style":751},[1209],{"type":612,"value":1210},".created_at ",{"type":606,"tag":636,"props":1212,"children":1213},{"style":745},[1214],{"type":612,"value":1172},{"type":606,"tag":636,"props":1216,"children":1217},{"style":751},[1218],{"type":612,"value":1219}," datetime.now()\n",{"type":606,"tag":636,"props":1221,"children":1222},{"class":638,"line":488},[1223],{"type":606,"tag":636,"props":1224,"children":1225},{"style":751},[1226],{"type":612,"value":842},{"type":606,"tag":636,"props":1228,"children":1229},{"class":638,"line":497},[1230,1234,1239,1244,1249,1254,1258,1263,1268,1272,1277,1282,1287],{"type":606,"tag":636,"props":1231,"children":1232},{"style":745},[1233],{"type":612,"value":972},{"type":606,"tag":636,"props":1235,"children":1236},{"style":810},[1237],{"type":612,"value":1238}," add_item",{"type":606,"tag":636,"props":1240,"children":1241},{"style":751},[1242],{"type":612,"value":1243},"(self, name: ",{"type":606,"tag":636,"props":1245,"children":1246},{"style":975},[1247],{"type":612,"value":1248},"str",{"type":606,"tag":636,"props":1250,"children":1251},{"style":751},[1252],{"type":612,"value":1253},", price: ",{"type":606,"tag":636,"props":1255,"children":1256},{"style":975},[1257],{"type":612,"value":988},{"type":606,"tag":636,"props":1259,"children":1260},{"style":751},[1261],{"type":612,"value":1262},", quantity: ",{"type":606,"tag":636,"props":1264,"children":1265},{"style":975},[1266],{"type":612,"value":1267},"int",{"type":606,"tag":636,"props":1269,"children":1270},{"style":745},[1271],{"type":612,"value":993},{"type":606,"tag":636,"props":1273,"children":1274},{"style":975},[1275],{"type":612,"value":1276}," 1",{"type":606,"tag":636,"props":1278,"children":1279},{"style":751},[1280],{"type":612,"value":1281},") -> ",{"type":606,"tag":636,"props":1283,"children":1284},{"style":975},[1285],{"type":612,"value":1286},"None",{"type":606,"tag":636,"props":1288,"children":1289},{"style":751},[1290],{"type":612,"value":818},{"type":606,"tag":636,"props":1292,"children":1293},{"class":638,"line":506},[1294],{"type":606,"tag":636,"props":1295,"children":1296},{"style":642},[1297],{"type":612,"value":1011},{"type":606,"tag":636,"props":1299,"children":1300},{"class":638,"line":515},[1301],{"type":606,"tag":636,"props":1302,"children":1303},{"style":642},[1304],{"type":612,"value":1305},"        Add an item to the shopping cart.\n",{"type":606,"tag":636,"props":1307,"children":1308},{"class":638,"line":524},[1309],{"type":606,"tag":636,"props":1310,"children":1311},{"style":642},[1312],{"type":612,"value":897},{"type":606,"tag":636,"props":1314,"children":1315},{"class":638,"line":533},[1316],{"type":606,"tag":636,"props":1317,"children":1318},{"style":642},[1319],{"type":612,"value":1034},{"type":606,"tag":636,"props":1321,"children":1322},{"class":638,"line":544},[1323],{"type":606,"tag":636,"props":1324,"children":1325},{"style":642},[1326],{"type":612,"value":1327},"            name (str): Name of the item\n",{"type":606,"tag":636,"props":1329,"children":1330},{"class":638,"line":553},[1331],{"type":606,"tag":636,"props":1332,"children":1333},{"style":642},[1334],{"type":612,"value":1335},"            price (float): Price per unit\n",{"type":606,"tag":636,"props":1337,"children":1338},{"class":638,"line":562},[1339],{"type":606,"tag":636,"props":1340,"children":1341},{"style":642},[1342],{"type":612,"value":1343},"            quantity (int): Number of items to add (default: 1)\n",{"type":606,"tag":636,"props":1345,"children":1346},{"class":638,"line":571},[1347],{"type":606,"tag":636,"props":1348,"children":1349},{"style":642},[1350],{"type":612,"value":1050},{"type":606,"tag":636,"props":1352,"children":1353},{"class":638,"line":580},[1354],{"type":606,"tag":636,"props":1355,"children":1356},{"style":642},[1357],{"type":612,"value":1058},{"type":606,"tag":636,"props":1359,"children":1360},{"class":638,"line":589},[1361],{"type":606,"tag":636,"props":1362,"children":1363},{"style":642},[1364],{"type":612,"value":1365},"            ValueError: If price is negative or quantity is not positive\n",{"type":606,"tag":636,"props":1367,"children":1369},{"class":638,"line":1368},64,[1370],{"type":606,"tag":636,"props":1371,"children":1372},{"style":642},[1373],{"type":612,"value":1050},{"type":606,"tag":636,"props":1375,"children":1377},{"class":638,"line":1376},65,[1378],{"type":606,"tag":636,"props":1379,"children":1380},{"style":642},[1381],{"type":612,"value":1382},"        Example:\n",{"type":606,"tag":636,"props":1384,"children":1386},{"class":638,"line":1385},66,[1387,1392],{"type":606,"tag":636,"props":1388,"children":1389},{"style":745},[1390],{"type":612,"value":1391},"            >>> ",{"type":606,"tag":636,"props":1393,"children":1394},{"style":642},[1395],{"type":612,"value":1396},"cart.add_item(\"laptop\", 999.99, 1)\n",{"type":606,"tag":636,"props":1398,"children":1400},{"class":638,"line":1399},67,[1401,1405],{"type":606,"tag":636,"props":1402,"children":1403},{"style":745},[1404],{"type":612,"value":1391},{"type":606,"tag":636,"props":1406,"children":1407},{"style":642},[1408],{"type":612,"value":1409},"len(cart.items)\n",{"type":606,"tag":636,"props":1411,"children":1413},{"class":638,"line":1412},68,[1414],{"type":606,"tag":636,"props":1415,"children":1416},{"style":642},[1417],{"type":612,"value":1418},"            1\n",{"type":606,"tag":636,"props":1420,"children":1422},{"class":638,"line":1421},69,[1423],{"type":606,"tag":636,"props":1424,"children":1425},{"style":642},[1426],{"type":612,"value":1011},{"type":606,"tag":636,"props":1428,"children":1430},{"class":638,"line":1429},70,[1431,1435,1440,1444,1448],{"type":606,"tag":636,"props":1432,"children":1433},{"style":745},[1434],{"type":612,"value":1081},{"type":606,"tag":636,"props":1436,"children":1437},{"style":751},[1438],{"type":612,"value":1439}," price ",{"type":606,"tag":636,"props":1441,"children":1442},{"style":745},[1443],{"type":612,"value":1091},{"type":606,"tag":636,"props":1445,"children":1446},{"style":975},[1447],{"type":612,"value":1096},{"type":606,"tag":636,"props":1449,"children":1450},{"style":751},[1451],{"type":612,"value":818},{"type":606,"tag":636,"props":1453,"children":1455},{"class":638,"line":1454},71,[1456,1460,1464,1468,1473],{"type":606,"tag":636,"props":1457,"children":1458},{"style":745},[1459],{"type":612,"value":1127},{"type":606,"tag":636,"props":1461,"children":1462},{"style":975},[1463],{"type":612,"value":1132},{"type":606,"tag":636,"props":1465,"children":1466},{"style":751},[1467],{"type":612,"value":1137},{"type":606,"tag":636,"props":1469,"children":1470},{"style":642},[1471],{"type":612,"value":1472},"\"Price cannot be negative\"",{"type":606,"tag":636,"props":1474,"children":1475},{"style":751},[1476],{"type":612,"value":1147},{"type":606,"tag":636,"props":1478,"children":1480},{"class":638,"line":1479},72,[1481,1485,1490,1495,1499],{"type":606,"tag":636,"props":1482,"children":1483},{"style":745},[1484],{"type":612,"value":1081},{"type":606,"tag":636,"props":1486,"children":1487},{"style":751},[1488],{"type":612,"value":1489}," quantity ",{"type":606,"tag":636,"props":1491,"children":1492},{"style":745},[1493],{"type":612,"value":1494},"\u003C=",{"type":606,"tag":636,"props":1496,"children":1497},{"style":975},[1498],{"type":612,"value":1096},{"type":606,"tag":636,"props":1500,"children":1501},{"style":751},[1502],{"type":612,"value":818},{"type":606,"tag":636,"props":1504,"children":1506},{"class":638,"line":1505},73,[1507,1511,1515,1519,1524],{"type":606,"tag":636,"props":1508,"children":1509},{"style":745},[1510],{"type":612,"value":1127},{"type":606,"tag":636,"props":1512,"children":1513},{"style":975},[1514],{"type":612,"value":1132},{"type":606,"tag":636,"props":1516,"children":1517},{"style":751},[1518],{"type":612,"value":1137},{"type":606,"tag":636,"props":1520,"children":1521},{"style":642},[1522],{"type":612,"value":1523},"\"Quantity must be positive\"",{"type":606,"tag":636,"props":1525,"children":1526},{"style":751},[1527],{"type":612,"value":1147},{"type":606,"tag":636,"props":1529,"children":1531},{"class":638,"line":1530},74,[1532],{"type":606,"tag":636,"props":1533,"children":1534},{"style":751},[1535],{"type":612,"value":897},{"type":606,"tag":636,"props":1537,"children":1539},{"class":638,"line":1538},75,[1540],{"type":606,"tag":636,"props":1541,"children":1543},{"style":1542},"--shiki-default:#6A737D;--shiki-app-dark-mode:#6A737D",[1544],{"type":612,"value":1545},"        # Check if item already exists in cart\n",{"type":606,"tag":636,"props":1547,"children":1549},{"class":638,"line":1548},76,[1550,1555,1560,1565,1570],{"type":606,"tag":636,"props":1551,"children":1552},{"style":745},[1553],{"type":612,"value":1554},"        for",{"type":606,"tag":636,"props":1556,"children":1557},{"style":751},[1558],{"type":612,"value":1559}," item ",{"type":606,"tag":636,"props":1561,"children":1562},{"style":745},[1563],{"type":612,"value":1564},"in",{"type":606,"tag":636,"props":1566,"children":1567},{"style":975},[1568],{"type":612,"value":1569}," self",{"type":606,"tag":636,"props":1571,"children":1572},{"style":751},[1573],{"type":612,"value":1574},".items:\n",{"type":606,"tag":636,"props":1576,"children":1578},{"class":638,"line":1577},77,[1579,1584,1589,1594,1599,1604,1609,1614,1618,1623,1627,1631],{"type":606,"tag":636,"props":1580,"children":1581},{"style":745},[1582],{"type":612,"value":1583},"            if",{"type":606,"tag":636,"props":1585,"children":1586},{"style":751},[1587],{"type":612,"value":1588}," item[",{"type":606,"tag":636,"props":1590,"children":1591},{"style":642},[1592],{"type":612,"value":1593},"'name'",{"type":606,"tag":636,"props":1595,"children":1596},{"style":751},[1597],{"type":612,"value":1598},"] ",{"type":606,"tag":636,"props":1600,"children":1601},{"style":745},[1602],{"type":612,"value":1603},"==",{"type":606,"tag":636,"props":1605,"children":1606},{"style":751},[1607],{"type":612,"value":1608}," name ",{"type":606,"tag":636,"props":1610,"children":1611},{"style":745},[1612],{"type":612,"value":1613},"and",{"type":606,"tag":636,"props":1615,"children":1616},{"style":751},[1617],{"type":612,"value":1588},{"type":606,"tag":636,"props":1619,"children":1620},{"style":642},[1621],{"type":612,"value":1622},"'price'",{"type":606,"tag":636,"props":1624,"children":1625},{"style":751},[1626],{"type":612,"value":1598},{"type":606,"tag":636,"props":1628,"children":1629},{"style":745},[1630],{"type":612,"value":1603},{"type":606,"tag":636,"props":1632,"children":1633},{"style":751},[1634],{"type":612,"value":1635}," price:\n",{"type":606,"tag":636,"props":1637,"children":1639},{"class":638,"line":1638},78,[1640,1645,1650,1654,1659],{"type":606,"tag":636,"props":1641,"children":1642},{"style":751},[1643],{"type":612,"value":1644},"                item[",{"type":606,"tag":636,"props":1646,"children":1647},{"style":642},[1648],{"type":612,"value":1649},"'quantity'",{"type":606,"tag":636,"props":1651,"children":1652},{"style":751},[1653],{"type":612,"value":1598},{"type":606,"tag":636,"props":1655,"children":1656},{"style":745},[1657],{"type":612,"value":1658},"+=",{"type":606,"tag":636,"props":1660,"children":1661},{"style":751},[1662],{"type":612,"value":1663}," quantity\n",{"type":606,"tag":636,"props":1665,"children":1667},{"class":638,"line":1666},79,[1668],{"type":606,"tag":636,"props":1669,"children":1670},{"style":745},[1671],{"type":612,"value":1672},"                return\n",{"type":606,"tag":636,"props":1674,"children":1676},{"class":638,"line":1675},80,[1677],{"type":606,"tag":636,"props":1678,"children":1679},{"style":751},[1680],{"type":612,"value":897},{"type":606,"tag":636,"props":1682,"children":1684},{"class":638,"line":1683},81,[1685],{"type":606,"tag":636,"props":1686,"children":1687},{"style":1542},[1688],{"type":612,"value":1689},"        # Add new item to cart\n",{"type":606,"tag":636,"props":1691,"children":1693},{"class":638,"line":1692},82,[1694,1699,1703],{"type":606,"tag":636,"props":1695,"children":1696},{"style":751},[1697],{"type":612,"value":1698},"        item ",{"type":606,"tag":636,"props":1700,"children":1701},{"style":745},[1702],{"type":612,"value":1172},{"type":606,"tag":636,"props":1704,"children":1705},{"style":751},[1706],{"type":612,"value":1707}," {\n",{"type":606,"tag":636,"props":1709,"children":1711},{"class":638,"line":1710},83,[1712,1717],{"type":606,"tag":636,"props":1713,"children":1714},{"style":642},[1715],{"type":612,"value":1716},"            'name'",{"type":606,"tag":636,"props":1718,"children":1719},{"style":751},[1720],{"type":612,"value":1721},": name,\n",{"type":606,"tag":636,"props":1723,"children":1725},{"class":638,"line":1724},84,[1726,1731],{"type":606,"tag":636,"props":1727,"children":1728},{"style":642},[1729],{"type":612,"value":1730},"            'price'",{"type":606,"tag":636,"props":1732,"children":1733},{"style":751},[1734],{"type":612,"value":1735},": price,\n",{"type":606,"tag":636,"props":1737,"children":1739},{"class":638,"line":1738},85,[1740,1745],{"type":606,"tag":636,"props":1741,"children":1742},{"style":642},[1743],{"type":612,"value":1744},"            'quantity'",{"type":606,"tag":636,"props":1746,"children":1747},{"style":751},[1748],{"type":612,"value":1749},": quantity,\n",{"type":606,"tag":636,"props":1751,"children":1753},{"class":638,"line":1752},86,[1754,1759],{"type":606,"tag":636,"props":1755,"children":1756},{"style":642},[1757],{"type":612,"value":1758},"            'added_at'",{"type":606,"tag":636,"props":1760,"children":1761},{"style":751},[1762],{"type":612,"value":1763},": datetime.now()\n",{"type":606,"tag":636,"props":1765,"children":1767},{"class":638,"line":1766},87,[1768],{"type":606,"tag":636,"props":1769,"children":1770},{"style":751},[1771],{"type":612,"value":1772},"        }\n",{"type":606,"tag":636,"props":1774,"children":1776},{"class":638,"line":1775},88,[1777,1781],{"type":606,"tag":636,"props":1778,"children":1779},{"style":975},[1780],{"type":612,"value":1162},{"type":606,"tag":636,"props":1782,"children":1783},{"style":751},[1784],{"type":612,"value":1785},".items.append(item)\n",{"type":606,"tag":636,"props":1787,"children":1789},{"class":638,"line":1788},89,[1790],{"type":606,"tag":636,"props":1791,"children":1792},{"style":751},[1793],{"type":612,"value":842},{"type":606,"tag":636,"props":1795,"children":1797},{"class":638,"line":1796},90,[1798,1802,1807,1811,1815,1819,1824],{"type":606,"tag":636,"props":1799,"children":1800},{"style":745},[1801],{"type":612,"value":972},{"type":606,"tag":636,"props":1803,"children":1804},{"style":810},[1805],{"type":612,"value":1806}," remove_item",{"type":606,"tag":636,"props":1808,"children":1809},{"style":751},[1810],{"type":612,"value":1243},{"type":606,"tag":636,"props":1812,"children":1813},{"style":975},[1814],{"type":612,"value":1248},{"type":606,"tag":636,"props":1816,"children":1817},{"style":751},[1818],{"type":612,"value":1281},{"type":606,"tag":636,"props":1820,"children":1821},{"style":975},[1822],{"type":612,"value":1823},"bool",{"type":606,"tag":636,"props":1825,"children":1826},{"style":751},[1827],{"type":612,"value":818},{"type":606,"tag":636,"props":1829,"children":1831},{"class":638,"line":1830},91,[1832],{"type":606,"tag":636,"props":1833,"children":1834},{"style":642},[1835],{"type":612,"value":1011},{"type":606,"tag":636,"props":1837,"children":1839},{"class":638,"line":1838},92,[1840],{"type":606,"tag":636,"props":1841,"children":1842},{"style":642},[1843],{"type":612,"value":1844},"        Remove an item from the cart by name.\n",{"type":606,"tag":636,"props":1846,"children":1848},{"class":638,"line":1847},93,[1849],{"type":606,"tag":636,"props":1850,"children":1851},{"style":642},[1852],{"type":612,"value":897},{"type":606,"tag":636,"props":1854,"children":1856},{"class":638,"line":1855},94,[1857],{"type":606,"tag":636,"props":1858,"children":1859},{"style":642},[1860],{"type":612,"value":1034},{"type":606,"tag":636,"props":1862,"children":1864},{"class":638,"line":1863},95,[1865],{"type":606,"tag":636,"props":1866,"children":1867},{"style":642},[1868],{"type":612,"value":1869},"            name (str): Name of the item to remove\n",{"type":606,"tag":636,"props":1871,"children":1873},{"class":638,"line":1872},96,[1874],{"type":606,"tag":636,"props":1875,"children":1876},{"style":642},[1877],{"type":612,"value":1050},{"type":606,"tag":636,"props":1879,"children":1881},{"class":638,"line":1880},97,[1882],{"type":606,"tag":636,"props":1883,"children":1884},{"style":642},[1885],{"type":612,"value":1886},"        Returns:\n",{"type":606,"tag":636,"props":1888,"children":1890},{"class":638,"line":1889},98,[1891],{"type":606,"tag":636,"props":1892,"children":1893},{"style":642},[1894],{"type":612,"value":1895},"            bool: True if item was found and removed, False otherwise\n",{"type":606,"tag":636,"props":1897,"children":1899},{"class":638,"line":1898},99,[1900],{"type":606,"tag":636,"props":1901,"children":1902},{"style":642},[1903],{"type":612,"value":1050},{"type":606,"tag":636,"props":1905,"children":1907},{"class":638,"line":1906},100,[1908],{"type":606,"tag":636,"props":1909,"children":1910},{"style":642},[1911],{"type":612,"value":1382},{"type":606,"tag":636,"props":1913,"children":1915},{"class":638,"line":1914},101,[1916,1920],{"type":606,"tag":636,"props":1917,"children":1918},{"style":745},[1919],{"type":612,"value":1391},{"type":606,"tag":636,"props":1921,"children":1922},{"style":642},[1923],{"type":612,"value":1924},"cart.add_item(\"book\", 19.99)\n",{"type":606,"tag":636,"props":1926,"children":1928},{"class":638,"line":1927},102,[1929,1933],{"type":606,"tag":636,"props":1930,"children":1931},{"style":745},[1932],{"type":612,"value":1391},{"type":606,"tag":636,"props":1934,"children":1935},{"style":642},[1936],{"type":612,"value":1937},"cart.remove_item(\"book\")\n",{"type":606,"tag":636,"props":1939,"children":1941},{"class":638,"line":1940},103,[1942],{"type":606,"tag":636,"props":1943,"children":1944},{"style":642},[1945],{"type":612,"value":1946},"            True\n",{"type":606,"tag":636,"props":1948,"children":1950},{"class":638,"line":1949},104,[1951,1955],{"type":606,"tag":636,"props":1952,"children":1953},{"style":745},[1954],{"type":612,"value":1391},{"type":606,"tag":636,"props":1956,"children":1957},{"style":642},[1958],{"type":612,"value":1959},"cart.remove_item(\"nonexistent\")\n",{"type":606,"tag":636,"props":1961,"children":1963},{"class":638,"line":1962},105,[1964],{"type":606,"tag":636,"props":1965,"children":1966},{"style":642},[1967],{"type":612,"value":1968},"            False\n",{"type":606,"tag":636,"props":1970,"children":1972},{"class":638,"line":1971},106,[1973],{"type":606,"tag":636,"props":1974,"children":1975},{"style":642},[1976],{"type":612,"value":1011},{"type":606,"tag":636,"props":1978,"children":1980},{"class":638,"line":1979},107,[1981,1985,1990,1994,1999,2003,2008],{"type":606,"tag":636,"props":1982,"children":1983},{"style":745},[1984],{"type":612,"value":1554},{"type":606,"tag":636,"props":1986,"children":1987},{"style":751},[1988],{"type":612,"value":1989}," i, item ",{"type":606,"tag":636,"props":1991,"children":1992},{"style":745},[1993],{"type":612,"value":1564},{"type":606,"tag":636,"props":1995,"children":1996},{"style":975},[1997],{"type":612,"value":1998}," enumerate",{"type":606,"tag":636,"props":2000,"children":2001},{"style":751},[2002],{"type":612,"value":1137},{"type":606,"tag":636,"props":2004,"children":2005},{"style":975},[2006],{"type":612,"value":2007},"self",{"type":606,"tag":636,"props":2009,"children":2010},{"style":751},[2011],{"type":612,"value":2012},".items):\n",{"type":606,"tag":636,"props":2014,"children":2016},{"class":638,"line":2015},108,[2017,2021,2025,2029,2033,2037],{"type":606,"tag":636,"props":2018,"children":2019},{"style":745},[2020],{"type":612,"value":1583},{"type":606,"tag":636,"props":2022,"children":2023},{"style":751},[2024],{"type":612,"value":1588},{"type":606,"tag":636,"props":2026,"children":2027},{"style":642},[2028],{"type":612,"value":1593},{"type":606,"tag":636,"props":2030,"children":2031},{"style":751},[2032],{"type":612,"value":1598},{"type":606,"tag":636,"props":2034,"children":2035},{"style":745},[2036],{"type":612,"value":1603},{"type":606,"tag":636,"props":2038,"children":2039},{"style":751},[2040],{"type":612,"value":2041}," name:\n",{"type":606,"tag":636,"props":2043,"children":2045},{"class":638,"line":2044},109,[2046,2051,2055],{"type":606,"tag":636,"props":2047,"children":2048},{"style":745},[2049],{"type":612,"value":2050},"                del",{"type":606,"tag":636,"props":2052,"children":2053},{"style":975},[2054],{"type":612,"value":1569},{"type":606,"tag":636,"props":2056,"children":2057},{"style":751},[2058],{"type":612,"value":2059},".items[i]\n",{"type":606,"tag":636,"props":2061,"children":2063},{"class":638,"line":2062},110,[2064,2069],{"type":606,"tag":636,"props":2065,"children":2066},{"style":745},[2067],{"type":612,"value":2068},"                return",{"type":606,"tag":636,"props":2070,"children":2071},{"style":975},[2072],{"type":612,"value":2073}," True\n",{"type":606,"tag":636,"props":2075,"children":2077},{"class":638,"line":2076},111,[2078,2083],{"type":606,"tag":636,"props":2079,"children":2080},{"style":745},[2081],{"type":612,"value":2082},"        return",{"type":606,"tag":636,"props":2084,"children":2085},{"style":975},[2086],{"type":612,"value":2087}," False\n",{"type":606,"tag":636,"props":2089,"children":2091},{"class":638,"line":2090},112,[2092],{"type":606,"tag":636,"props":2093,"children":2094},{"style":751},[2095],{"type":612,"value":842},{"type":606,"tag":636,"props":2097,"children":2099},{"class":638,"line":2098},113,[2100,2104,2109,2114,2118],{"type":606,"tag":636,"props":2101,"children":2102},{"style":745},[2103],{"type":612,"value":972},{"type":606,"tag":636,"props":2105,"children":2106},{"style":810},[2107],{"type":612,"value":2108}," get_subtotal",{"type":606,"tag":636,"props":2110,"children":2111},{"style":751},[2112],{"type":612,"value":2113},"(self) -> ",{"type":606,"tag":636,"props":2115,"children":2116},{"style":975},[2117],{"type":612,"value":988},{"type":606,"tag":636,"props":2119,"children":2120},{"style":751},[2121],{"type":612,"value":818},{"type":606,"tag":636,"props":2123,"children":2125},{"class":638,"line":2124},114,[2126],{"type":606,"tag":636,"props":2127,"children":2128},{"style":642},[2129],{"type":612,"value":1011},{"type":606,"tag":636,"props":2131,"children":2133},{"class":638,"line":2132},115,[2134],{"type":606,"tag":636,"props":2135,"children":2136},{"style":642},[2137],{"type":612,"value":2138},"        Calculate the subtotal before discount.\n",{"type":606,"tag":636,"props":2140,"children":2142},{"class":638,"line":2141},116,[2143],{"type":606,"tag":636,"props":2144,"children":2145},{"style":642},[2146],{"type":612,"value":897},{"type":606,"tag":636,"props":2148,"children":2150},{"class":638,"line":2149},117,[2151],{"type":606,"tag":636,"props":2152,"children":2153},{"style":642},[2154],{"type":612,"value":1886},{"type":606,"tag":636,"props":2156,"children":2158},{"class":638,"line":2157},118,[2159],{"type":606,"tag":636,"props":2160,"children":2161},{"style":642},[2162],{"type":612,"value":2163},"            float: Total price of all items before discount\n",{"type":606,"tag":636,"props":2165,"children":2167},{"class":638,"line":2166},119,[2168],{"type":606,"tag":636,"props":2169,"children":2170},{"style":642},[2171],{"type":612,"value":1050},{"type":606,"tag":636,"props":2173,"children":2175},{"class":638,"line":2174},120,[2176],{"type":606,"tag":636,"props":2177,"children":2178},{"style":642},[2179],{"type":612,"value":1382},{"type":606,"tag":636,"props":2181,"children":2183},{"class":638,"line":2182},121,[2184,2188],{"type":606,"tag":636,"props":2185,"children":2186},{"style":745},[2187],{"type":612,"value":1391},{"type":606,"tag":636,"props":2189,"children":2190},{"style":642},[2191],{"type":612,"value":2192},"cart.add_item(\"book\", 10.00, 2)\n",{"type":606,"tag":636,"props":2194,"children":2196},{"class":638,"line":2195},122,[2197,2201],{"type":606,"tag":636,"props":2198,"children":2199},{"style":745},[2200],{"type":612,"value":1391},{"type":606,"tag":636,"props":2202,"children":2203},{"style":642},[2204],{"type":612,"value":2205},"cart.get_subtotal()\n",{"type":606,"tag":636,"props":2207,"children":2209},{"class":638,"line":2208},123,[2210],{"type":606,"tag":636,"props":2211,"children":2212},{"style":642},[2213],{"type":612,"value":2214},"            20.0\n",{"type":606,"tag":636,"props":2216,"children":2218},{"class":638,"line":2217},124,[2219],{"type":606,"tag":636,"props":2220,"children":2221},{"style":642},[2222],{"type":612,"value":1011},{"type":606,"tag":636,"props":2224,"children":2226},{"class":638,"line":2225},125,[2227,2231,2236,2241,2245,2249,2254,2258,2262,2266,2271,2275,2279,2283],{"type":606,"tag":636,"props":2228,"children":2229},{"style":745},[2230],{"type":612,"value":2082},{"type":606,"tag":636,"props":2232,"children":2233},{"style":975},[2234],{"type":612,"value":2235}," sum",{"type":606,"tag":636,"props":2237,"children":2238},{"style":751},[2239],{"type":612,"value":2240},"(item[",{"type":606,"tag":636,"props":2242,"children":2243},{"style":642},[2244],{"type":612,"value":1622},{"type":606,"tag":636,"props":2246,"children":2247},{"style":751},[2248],{"type":612,"value":1598},{"type":606,"tag":636,"props":2250,"children":2251},{"style":745},[2252],{"type":612,"value":2253},"*",{"type":606,"tag":636,"props":2255,"children":2256},{"style":751},[2257],{"type":612,"value":1588},{"type":606,"tag":636,"props":2259,"children":2260},{"style":642},[2261],{"type":612,"value":1649},{"type":606,"tag":636,"props":2263,"children":2264},{"style":751},[2265],{"type":612,"value":1598},{"type":606,"tag":636,"props":2267,"children":2268},{"style":745},[2269],{"type":612,"value":2270},"for",{"type":606,"tag":636,"props":2272,"children":2273},{"style":751},[2274],{"type":612,"value":1559},{"type":606,"tag":636,"props":2276,"children":2277},{"style":745},[2278],{"type":612,"value":1564},{"type":606,"tag":636,"props":2280,"children":2281},{"style":975},[2282],{"type":612,"value":1569},{"type":606,"tag":636,"props":2284,"children":2285},{"style":751},[2286],{"type":612,"value":2287},".items)\n",{"type":606,"tag":636,"props":2289,"children":2291},{"class":638,"line":2290},126,[2292],{"type":606,"tag":636,"props":2293,"children":2294},{"style":751},[2295],{"type":612,"value":842},{"type":606,"tag":636,"props":2297,"children":2299},{"class":638,"line":2298},127,[2300,2304,2309,2313,2317],{"type":606,"tag":636,"props":2301,"children":2302},{"style":745},[2303],{"type":612,"value":972},{"type":606,"tag":636,"props":2305,"children":2306},{"style":810},[2307],{"type":612,"value":2308}," get_total",{"type":606,"tag":636,"props":2310,"children":2311},{"style":751},[2312],{"type":612,"value":2113},{"type":606,"tag":636,"props":2314,"children":2315},{"style":975},[2316],{"type":612,"value":988},{"type":606,"tag":636,"props":2318,"children":2319},{"style":751},[2320],{"type":612,"value":818},{"type":606,"tag":636,"props":2322,"children":2324},{"class":638,"line":2323},128,[2325],{"type":606,"tag":636,"props":2326,"children":2327},{"style":642},[2328],{"type":612,"value":1011},{"type":606,"tag":636,"props":2330,"children":2332},{"class":638,"line":2331},129,[2333],{"type":606,"tag":636,"props":2334,"children":2335},{"style":642},[2336],{"type":612,"value":2337},"        Calculate the final total after applying discount.\n",{"type":606,"tag":636,"props":2339,"children":2341},{"class":638,"line":2340},130,[2342],{"type":606,"tag":636,"props":2343,"children":2344},{"style":642},[2345],{"type":612,"value":897},{"type":606,"tag":636,"props":2347,"children":2349},{"class":638,"line":2348},131,[2350],{"type":606,"tag":636,"props":2351,"children":2352},{"style":642},[2353],{"type":612,"value":1886},{"type":606,"tag":636,"props":2355,"children":2357},{"class":638,"line":2356},132,[2358],{"type":606,"tag":636,"props":2359,"children":2360},{"style":642},[2361],{"type":612,"value":2362},"            float: Final total after discount, rounded to 2 decimal places\n",{"type":606,"tag":636,"props":2364,"children":2366},{"class":638,"line":2365},133,[2367],{"type":606,"tag":636,"props":2368,"children":2369},{"style":642},[2370],{"type":612,"value":1050},{"type":606,"tag":636,"props":2372,"children":2374},{"class":638,"line":2373},134,[2375],{"type":606,"tag":636,"props":2376,"children":2377},{"style":642},[2378],{"type":612,"value":1382},{"type":606,"tag":636,"props":2380,"children":2382},{"class":638,"line":2381},135,[2383,2387],{"type":606,"tag":636,"props":2384,"children":2385},{"style":745},[2386],{"type":612,"value":1391},{"type":606,"tag":636,"props":2388,"children":2389},{"style":642},[2390],{"type":612,"value":2391},"cart = ShoppingCart(discount_rate=0.1)  # 10% discount\n",{"type":606,"tag":636,"props":2393,"children":2395},{"class":638,"line":2394},136,[2396,2400],{"type":606,"tag":636,"props":2397,"children":2398},{"style":745},[2399],{"type":612,"value":1391},{"type":606,"tag":636,"props":2401,"children":2402},{"style":642},[2403],{"type":612,"value":2404},"cart.add_item(\"item\", 100.00)\n",{"type":606,"tag":636,"props":2406,"children":2408},{"class":638,"line":2407},137,[2409,2413],{"type":606,"tag":636,"props":2410,"children":2411},{"style":745},[2412],{"type":612,"value":1391},{"type":606,"tag":636,"props":2414,"children":2415},{"style":642},[2416],{"type":612,"value":942},{"type":606,"tag":636,"props":2418,"children":2420},{"class":638,"line":2419},138,[2421],{"type":606,"tag":636,"props":2422,"children":2423},{"style":642},[2424],{"type":612,"value":2425},"            90.0\n",{"type":606,"tag":636,"props":2427,"children":2429},{"class":638,"line":2428},139,[2430],{"type":606,"tag":636,"props":2431,"children":2432},{"style":642},[2433],{"type":612,"value":1011},{"type":606,"tag":636,"props":2435,"children":2437},{"class":638,"line":2436},140,[2438,2443,2447,2451],{"type":606,"tag":636,"props":2439,"children":2440},{"style":751},[2441],{"type":612,"value":2442},"        subtotal ",{"type":606,"tag":636,"props":2444,"children":2445},{"style":745},[2446],{"type":612,"value":1172},{"type":606,"tag":636,"props":2448,"children":2449},{"style":975},[2450],{"type":612,"value":1569},{"type":606,"tag":636,"props":2452,"children":2453},{"style":751},[2454],{"type":612,"value":2455},".get_subtotal()\n",{"type":606,"tag":636,"props":2457,"children":2459},{"class":638,"line":2458},141,[2460,2465,2469,2474,2478,2482],{"type":606,"tag":636,"props":2461,"children":2462},{"style":751},[2463],{"type":612,"value":2464},"        discount_amount ",{"type":606,"tag":636,"props":2466,"children":2467},{"style":745},[2468],{"type":612,"value":1172},{"type":606,"tag":636,"props":2470,"children":2471},{"style":751},[2472],{"type":612,"value":2473}," subtotal ",{"type":606,"tag":636,"props":2475,"children":2476},{"style":745},[2477],{"type":612,"value":2253},{"type":606,"tag":636,"props":2479,"children":2480},{"style":975},[2481],{"type":612,"value":1569},{"type":606,"tag":636,"props":2483,"children":2484},{"style":751},[2485],{"type":612,"value":2486},".discount_rate\n",{"type":606,"tag":636,"props":2488,"children":2490},{"class":638,"line":2489},142,[2491,2496,2500,2504,2509],{"type":606,"tag":636,"props":2492,"children":2493},{"style":751},[2494],{"type":612,"value":2495},"        final_total ",{"type":606,"tag":636,"props":2497,"children":2498},{"style":745},[2499],{"type":612,"value":1172},{"type":606,"tag":636,"props":2501,"children":2502},{"style":751},[2503],{"type":612,"value":2473},{"type":606,"tag":636,"props":2505,"children":2506},{"style":745},[2507],{"type":612,"value":2508},"-",{"type":606,"tag":636,"props":2510,"children":2511},{"style":751},[2512],{"type":612,"value":2513}," discount_amount\n",{"type":606,"tag":636,"props":2515,"children":2517},{"class":638,"line":2516},143,[2518,2522,2527,2532,2537],{"type":606,"tag":636,"props":2519,"children":2520},{"style":745},[2521],{"type":612,"value":2082},{"type":606,"tag":636,"props":2523,"children":2524},{"style":975},[2525],{"type":612,"value":2526}," round",{"type":606,"tag":636,"props":2528,"children":2529},{"style":751},[2530],{"type":612,"value":2531},"(final_total, ",{"type":606,"tag":636,"props":2533,"children":2534},{"style":975},[2535],{"type":612,"value":2536},"2",{"type":606,"tag":636,"props":2538,"children":2539},{"style":751},[2540],{"type":612,"value":1147},{"type":606,"tag":636,"props":2542,"children":2544},{"class":638,"line":2543},144,[2545],{"type":606,"tag":636,"props":2546,"children":2547},{"style":751},[2548],{"type":612,"value":842},{"type":606,"tag":636,"props":2550,"children":2552},{"class":638,"line":2551},145,[2553,2557,2562,2566,2570],{"type":606,"tag":636,"props":2554,"children":2555},{"style":745},[2556],{"type":612,"value":972},{"type":606,"tag":636,"props":2558,"children":2559},{"style":810},[2560],{"type":612,"value":2561}," get_item_count",{"type":606,"tag":636,"props":2563,"children":2564},{"style":751},[2565],{"type":612,"value":2113},{"type":606,"tag":636,"props":2567,"children":2568},{"style":975},[2569],{"type":612,"value":1267},{"type":606,"tag":636,"props":2571,"children":2572},{"style":751},[2573],{"type":612,"value":818},{"type":606,"tag":636,"props":2575,"children":2577},{"class":638,"line":2576},146,[2578],{"type":606,"tag":636,"props":2579,"children":2580},{"style":642},[2581],{"type":612,"value":1011},{"type":606,"tag":636,"props":2583,"children":2585},{"class":638,"line":2584},147,[2586],{"type":606,"tag":636,"props":2587,"children":2588},{"style":642},[2589],{"type":612,"value":2590},"        Get the total number of items in the cart.\n",{"type":606,"tag":636,"props":2592,"children":2594},{"class":638,"line":2593},148,[2595],{"type":606,"tag":636,"props":2596,"children":2597},{"style":642},[2598],{"type":612,"value":897},{"type":606,"tag":636,"props":2600,"children":2602},{"class":638,"line":2601},149,[2603],{"type":606,"tag":636,"props":2604,"children":2605},{"style":642},[2606],{"type":612,"value":1886},{"type":606,"tag":636,"props":2608,"children":2610},{"class":638,"line":2609},150,[2611],{"type":606,"tag":636,"props":2612,"children":2613},{"style":642},[2614],{"type":612,"value":2615},"            int: Total quantity of all items\n",{"type":606,"tag":636,"props":2617,"children":2619},{"class":638,"line":2618},151,[2620],{"type":606,"tag":636,"props":2621,"children":2622},{"style":642},[2623],{"type":612,"value":1050},{"type":606,"tag":636,"props":2625,"children":2627},{"class":638,"line":2626},152,[2628],{"type":606,"tag":636,"props":2629,"children":2630},{"style":642},[2631],{"type":612,"value":2632},"        Note:\n",{"type":606,"tag":636,"props":2634,"children":2636},{"class":638,"line":2635},153,[2637],{"type":606,"tag":636,"props":2638,"children":2639},{"style":642},[2640],{"type":612,"value":2641},"            This counts individual items, not unique products.\n",{"type":606,"tag":636,"props":2643,"children":2645},{"class":638,"line":2644},154,[2646],{"type":606,"tag":636,"props":2647,"children":2648},{"style":642},[2649],{"type":612,"value":2650},"            For example, 3 books and 2 pens = 5 items total.\n",{"type":606,"tag":636,"props":2652,"children":2654},{"class":638,"line":2653},155,[2655],{"type":606,"tag":636,"props":2656,"children":2657},{"style":642},[2658],{"type":612,"value":1011},{"type":606,"tag":636,"props":2660,"children":2662},{"class":638,"line":2661},156,[2663,2667,2671,2675,2679,2683,2687,2691,2695,2699],{"type":606,"tag":636,"props":2664,"children":2665},{"style":745},[2666],{"type":612,"value":2082},{"type":606,"tag":636,"props":2668,"children":2669},{"style":975},[2670],{"type":612,"value":2235},{"type":606,"tag":636,"props":2672,"children":2673},{"style":751},[2674],{"type":612,"value":2240},{"type":606,"tag":636,"props":2676,"children":2677},{"style":642},[2678],{"type":612,"value":1649},{"type":606,"tag":636,"props":2680,"children":2681},{"style":751},[2682],{"type":612,"value":1598},{"type":606,"tag":636,"props":2684,"children":2685},{"style":745},[2686],{"type":612,"value":2270},{"type":606,"tag":636,"props":2688,"children":2689},{"style":751},[2690],{"type":612,"value":1559},{"type":606,"tag":636,"props":2692,"children":2693},{"style":745},[2694],{"type":612,"value":1564},{"type":606,"tag":636,"props":2696,"children":2697},{"style":975},[2698],{"type":612,"value":1569},{"type":606,"tag":636,"props":2700,"children":2701},{"style":751},[2702],{"type":612,"value":2287},{"type":606,"tag":636,"props":2704,"children":2706},{"class":638,"line":2705},157,[2707],{"type":606,"tag":636,"props":2708,"children":2709},{"style":751},[2710],{"type":612,"value":842},{"type":606,"tag":636,"props":2712,"children":2714},{"class":638,"line":2713},158,[2715,2719,2724,2728,2732],{"type":606,"tag":636,"props":2716,"children":2717},{"style":745},[2718],{"type":612,"value":972},{"type":606,"tag":636,"props":2720,"children":2721},{"style":810},[2722],{"type":612,"value":2723}," is_empty",{"type":606,"tag":636,"props":2725,"children":2726},{"style":751},[2727],{"type":612,"value":2113},{"type":606,"tag":636,"props":2729,"children":2730},{"style":975},[2731],{"type":612,"value":1823},{"type":606,"tag":636,"props":2733,"children":2734},{"style":751},[2735],{"type":612,"value":818},{"type":606,"tag":636,"props":2737,"children":2739},{"class":638,"line":2738},159,[2740],{"type":606,"tag":636,"props":2741,"children":2742},{"style":642},[2743],{"type":612,"value":1011},{"type":606,"tag":636,"props":2745,"children":2747},{"class":638,"line":2746},160,[2748],{"type":606,"tag":636,"props":2749,"children":2750},{"style":642},[2751],{"type":612,"value":2752},"        Check if the cart is empty.\n",{"type":606,"tag":636,"props":2754,"children":2756},{"class":638,"line":2755},161,[2757],{"type":606,"tag":636,"props":2758,"children":2759},{"style":642},[2760],{"type":612,"value":897},{"type":606,"tag":636,"props":2762,"children":2764},{"class":638,"line":2763},162,[2765],{"type":606,"tag":636,"props":2766,"children":2767},{"style":642},[2768],{"type":612,"value":1886},{"type":606,"tag":636,"props":2770,"children":2772},{"class":638,"line":2771},163,[2773],{"type":606,"tag":636,"props":2774,"children":2775},{"style":642},[2776],{"type":612,"value":2777},"            bool: True if cart has no items, False otherwise\n",{"type":606,"tag":636,"props":2779,"children":2781},{"class":638,"line":2780},164,[2782],{"type":606,"tag":636,"props":2783,"children":2784},{"style":642},[2785],{"type":612,"value":1011},{"type":606,"tag":636,"props":2787,"children":2789},{"class":638,"line":2788},165,[2790,2794,2799,2803,2807,2812,2816],{"type":606,"tag":636,"props":2791,"children":2792},{"style":745},[2793],{"type":612,"value":2082},{"type":606,"tag":636,"props":2795,"children":2796},{"style":975},[2797],{"type":612,"value":2798}," len",{"type":606,"tag":636,"props":2800,"children":2801},{"style":751},[2802],{"type":612,"value":1137},{"type":606,"tag":636,"props":2804,"children":2805},{"style":975},[2806],{"type":612,"value":2007},{"type":606,"tag":636,"props":2808,"children":2809},{"style":751},[2810],{"type":612,"value":2811},".items) ",{"type":606,"tag":636,"props":2813,"children":2814},{"style":745},[2815],{"type":612,"value":1603},{"type":606,"tag":636,"props":2817,"children":2818},{"style":975},[2819],{"type":612,"value":2820}," 0\n",{"type":606,"tag":636,"props":2822,"children":2824},{"class":638,"line":2823},166,[2825],{"type":606,"tag":636,"props":2826,"children":2827},{"style":751},[2828],{"type":612,"value":842},{"type":606,"tag":636,"props":2830,"children":2832},{"class":638,"line":2831},167,[2833,2837,2842,2846,2850],{"type":606,"tag":636,"props":2834,"children":2835},{"style":745},[2836],{"type":612,"value":972},{"type":606,"tag":636,"props":2838,"children":2839},{"style":810},[2840],{"type":612,"value":2841}," clear",{"type":606,"tag":636,"props":2843,"children":2844},{"style":751},[2845],{"type":612,"value":2113},{"type":606,"tag":636,"props":2847,"children":2848},{"style":975},[2849],{"type":612,"value":1286},{"type":606,"tag":636,"props":2851,"children":2852},{"style":751},[2853],{"type":612,"value":818},{"type":606,"tag":636,"props":2855,"children":2857},{"class":638,"line":2856},168,[2858],{"type":606,"tag":636,"props":2859,"children":2860},{"style":642},[2861],{"type":612,"value":1011},{"type":606,"tag":636,"props":2863,"children":2865},{"class":638,"line":2864},169,[2866],{"type":606,"tag":636,"props":2867,"children":2868},{"style":642},[2869],{"type":612,"value":2870},"        Remove all items from the cart.\n",{"type":606,"tag":636,"props":2872,"children":2874},{"class":638,"line":2873},170,[2875],{"type":606,"tag":636,"props":2876,"children":2877},{"style":642},[2878],{"type":612,"value":897},{"type":606,"tag":636,"props":2880,"children":2882},{"class":638,"line":2881},171,[2883],{"type":606,"tag":636,"props":2884,"children":2885},{"style":642},[2886],{"type":612,"value":2887},"        Warning:\n",{"type":606,"tag":636,"props":2889,"children":2891},{"class":638,"line":2890},172,[2892],{"type":606,"tag":636,"props":2893,"children":2894},{"style":642},[2895],{"type":612,"value":2896},"            This action cannot be undone. All items will be permanently\n",{"type":606,"tag":636,"props":2898,"children":2900},{"class":638,"line":2899},173,[2901],{"type":606,"tag":636,"props":2902,"children":2903},{"style":642},[2904],{"type":612,"value":2905},"            removed from the cart.\n",{"type":606,"tag":636,"props":2907,"children":2909},{"class":638,"line":2908},174,[2910],{"type":606,"tag":636,"props":2911,"children":2912},{"style":642},[2913],{"type":612,"value":1011},{"type":606,"tag":636,"props":2915,"children":2917},{"class":638,"line":2916},175,[2918,2922],{"type":606,"tag":636,"props":2919,"children":2920},{"style":975},[2921],{"type":612,"value":1162},{"type":606,"tag":636,"props":2923,"children":2924},{"style":751},[2925],{"type":612,"value":2926},".items.clear()\n",{"type":606,"tag":636,"props":2928,"children":2930},{"class":638,"line":2929},176,[2931],{"type":606,"tag":636,"props":2932,"children":2933},{"emptyLinePlaceholder":13},[2934],{"type":612,"value":661},{"type":606,"tag":636,"props":2936,"children":2938},{"class":638,"line":2937},177,[2939],{"type":606,"tag":636,"props":2940,"children":2941},{"emptyLinePlaceholder":13},[2942],{"type":612,"value":661},{"type":606,"tag":636,"props":2944,"children":2946},{"class":638,"line":2945},178,[2947,2952,2957,2962,2966,2971,2975,2979,2983],{"type":606,"tag":636,"props":2948,"children":2949},{"style":745},[2950],{"type":612,"value":2951},"def",{"type":606,"tag":636,"props":2953,"children":2954},{"style":810},[2955],{"type":612,"value":2956}," calculate_shipping_cost",{"type":606,"tag":636,"props":2958,"children":2959},{"style":751},[2960],{"type":612,"value":2961},"(total_weight: ",{"type":606,"tag":636,"props":2963,"children":2964},{"style":975},[2965],{"type":612,"value":988},{"type":606,"tag":636,"props":2967,"children":2968},{"style":751},[2969],{"type":612,"value":2970},", distance: ",{"type":606,"tag":636,"props":2972,"children":2973},{"style":975},[2974],{"type":612,"value":988},{"type":606,"tag":636,"props":2976,"children":2977},{"style":751},[2978],{"type":612,"value":1281},{"type":606,"tag":636,"props":2980,"children":2981},{"style":975},[2982],{"type":612,"value":988},{"type":606,"tag":636,"props":2984,"children":2985},{"style":751},[2986],{"type":612,"value":818},{"type":606,"tag":636,"props":2988,"children":2990},{"class":638,"line":2989},179,[2991],{"type":606,"tag":636,"props":2992,"children":2993},{"style":642},[2994],{"type":612,"value":826},{"type":606,"tag":636,"props":2996,"children":2998},{"class":638,"line":2997},180,[2999],{"type":606,"tag":636,"props":3000,"children":3001},{"style":642},[3002],{"type":612,"value":3003},"    Calculate shipping cost based on weight and distance.\n",{"type":606,"tag":636,"props":3005,"children":3007},{"class":638,"line":3006},181,[3008],{"type":606,"tag":636,"props":3009,"children":3010},{"style":642},[3011],{"type":612,"value":842},{"type":606,"tag":636,"props":3013,"children":3015},{"class":638,"line":3014},182,[3016],{"type":606,"tag":636,"props":3017,"children":3018},{"style":642},[3019],{"type":612,"value":3020},"    The shipping cost is calculated using a base rate plus weight and\n",{"type":606,"tag":636,"props":3022,"children":3024},{"class":638,"line":3023},183,[3025],{"type":606,"tag":636,"props":3026,"children":3027},{"style":642},[3028],{"type":612,"value":3029},"    distance charges. Free shipping applies for orders over certain weight.\n",{"type":606,"tag":636,"props":3031,"children":3033},{"class":638,"line":3032},184,[3034],{"type":606,"tag":636,"props":3035,"children":3036},{"style":642},[3037],{"type":612,"value":842},{"type":606,"tag":636,"props":3039,"children":3041},{"class":638,"line":3040},185,[3042],{"type":606,"tag":636,"props":3043,"children":3044},{"style":642},[3045],{"type":612,"value":3046},"    Args:\n",{"type":606,"tag":636,"props":3048,"children":3050},{"class":638,"line":3049},186,[3051],{"type":606,"tag":636,"props":3052,"children":3053},{"style":642},[3054],{"type":612,"value":3055},"        total_weight (float): Total weight in kg\n",{"type":606,"tag":636,"props":3057,"children":3059},{"class":638,"line":3058},187,[3060],{"type":606,"tag":636,"props":3061,"children":3062},{"style":642},[3063],{"type":612,"value":3064},"        distance (float): Shipping distance in km\n",{"type":606,"tag":636,"props":3066,"children":3068},{"class":638,"line":3067},188,[3069],{"type":606,"tag":636,"props":3070,"children":3071},{"style":642},[3072],{"type":612,"value":897},{"type":606,"tag":636,"props":3074,"children":3076},{"class":638,"line":3075},189,[3077],{"type":606,"tag":636,"props":3078,"children":3079},{"style":642},[3080],{"type":612,"value":3081},"    Returns:\n",{"type":606,"tag":636,"props":3083,"children":3085},{"class":638,"line":3084},190,[3086],{"type":606,"tag":636,"props":3087,"children":3088},{"style":642},[3089],{"type":612,"value":3090},"        float: Shipping cost in dollars\n",{"type":606,"tag":636,"props":3092,"children":3094},{"class":638,"line":3093},191,[3095],{"type":606,"tag":636,"props":3096,"children":3097},{"style":642},[3098],{"type":612,"value":897},{"type":606,"tag":636,"props":3100,"children":3102},{"class":638,"line":3101},192,[3103],{"type":606,"tag":636,"props":3104,"children":3105},{"style":642},[3106],{"type":612,"value":3107},"    Raises:\n",{"type":606,"tag":636,"props":3109,"children":3111},{"class":638,"line":3110},193,[3112],{"type":606,"tag":636,"props":3113,"children":3114},{"style":642},[3115],{"type":612,"value":3116},"        ValueError: If weight or distance is negative\n",{"type":606,"tag":636,"props":3118,"children":3120},{"class":638,"line":3119},194,[3121],{"type":606,"tag":636,"props":3122,"children":3123},{"style":642},[3124],{"type":612,"value":897},{"type":606,"tag":636,"props":3126,"children":3128},{"class":638,"line":3127},195,[3129],{"type":606,"tag":636,"props":3130,"children":3131},{"style":642},[3132],{"type":612,"value":3133},"    Note:\n",{"type":606,"tag":636,"props":3135,"children":3137},{"class":638,"line":3136},196,[3138],{"type":606,"tag":636,"props":3139,"children":3140},{"style":642},[3141],{"type":612,"value":3142},"        Free shipping applies for orders over 10kg.\n",{"type":606,"tag":636,"props":3144,"children":3146},{"class":638,"line":3145},197,[3147],{"type":606,"tag":636,"props":3148,"children":3149},{"style":642},[3150],{"type":612,"value":897},{"type":606,"tag":636,"props":3152,"children":3154},{"class":638,"line":3153},198,[3155],{"type":606,"tag":636,"props":3156,"children":3157},{"style":642},[3158],{"type":612,"value":905},{"type":606,"tag":636,"props":3160,"children":3162},{"class":638,"line":3161},199,[3163,3167],{"type":606,"tag":636,"props":3164,"children":3165},{"style":745},[3166],{"type":612,"value":913},{"type":606,"tag":636,"props":3168,"children":3169},{"style":642},[3170],{"type":612,"value":3171},"calculate_shipping_cost(2.5, 100)  # 2.5kg, 100km\n",{"type":606,"tag":636,"props":3173,"children":3175},{"class":638,"line":3174},200,[3176],{"type":606,"tag":636,"props":3177,"children":3178},{"style":642},[3179],{"type":612,"value":3180},"        12.5\n",{"type":606,"tag":636,"props":3182,"children":3184},{"class":638,"line":3183},201,[3185,3189],{"type":606,"tag":636,"props":3186,"children":3187},{"style":745},[3188],{"type":612,"value":913},{"type":606,"tag":636,"props":3190,"children":3191},{"style":642},[3192],{"type":612,"value":3193},"calculate_shipping_cost(15, 50)     # Free shipping\n",{"type":606,"tag":636,"props":3195,"children":3197},{"class":638,"line":3196},202,[3198],{"type":606,"tag":636,"props":3199,"children":3200},{"style":642},[3201],{"type":612,"value":3202},"        0.0\n",{"type":606,"tag":636,"props":3204,"children":3206},{"class":638,"line":3205},203,[3207],{"type":606,"tag":636,"props":3208,"children":3209},{"style":642},[3210],{"type":612,"value":826},{"type":606,"tag":636,"props":3212,"children":3214},{"class":638,"line":3213},204,[3215,3220,3225,3229,3233,3237,3242,3246,3250],{"type":606,"tag":636,"props":3216,"children":3217},{"style":745},[3218],{"type":612,"value":3219},"    if",{"type":606,"tag":636,"props":3221,"children":3222},{"style":751},[3223],{"type":612,"value":3224}," total_weight ",{"type":606,"tag":636,"props":3226,"children":3227},{"style":745},[3228],{"type":612,"value":1091},{"type":606,"tag":636,"props":3230,"children":3231},{"style":975},[3232],{"type":612,"value":1096},{"type":606,"tag":636,"props":3234,"children":3235},{"style":745},[3236],{"type":612,"value":1101},{"type":606,"tag":636,"props":3238,"children":3239},{"style":751},[3240],{"type":612,"value":3241}," distance ",{"type":606,"tag":636,"props":3243,"children":3244},{"style":745},[3245],{"type":612,"value":1091},{"type":606,"tag":636,"props":3247,"children":3248},{"style":975},[3249],{"type":612,"value":1096},{"type":606,"tag":636,"props":3251,"children":3252},{"style":751},[3253],{"type":612,"value":818},{"type":606,"tag":636,"props":3255,"children":3257},{"class":638,"line":3256},205,[3258,3263,3267,3271,3276],{"type":606,"tag":636,"props":3259,"children":3260},{"style":745},[3261],{"type":612,"value":3262},"        raise",{"type":606,"tag":636,"props":3264,"children":3265},{"style":975},[3266],{"type":612,"value":1132},{"type":606,"tag":636,"props":3268,"children":3269},{"style":751},[3270],{"type":612,"value":1137},{"type":606,"tag":636,"props":3272,"children":3273},{"style":642},[3274],{"type":612,"value":3275},"\"Weight and distance must be non-negative\"",{"type":606,"tag":636,"props":3277,"children":3278},{"style":751},[3279],{"type":612,"value":1147},{"type":606,"tag":636,"props":3281,"children":3283},{"class":638,"line":3282},206,[3284],{"type":606,"tag":636,"props":3285,"children":3286},{"style":751},[3287],{"type":612,"value":842},{"type":606,"tag":636,"props":3289,"children":3291},{"class":638,"line":3290},207,[3292],{"type":606,"tag":636,"props":3293,"children":3294},{"style":1542},[3295],{"type":612,"value":3296},"    # Free shipping for heavy orders\n",{"type":606,"tag":636,"props":3298,"children":3300},{"class":638,"line":3299},208,[3301,3305,3309,3313,3318],{"type":606,"tag":636,"props":3302,"children":3303},{"style":745},[3304],{"type":612,"value":3219},{"type":606,"tag":636,"props":3306,"children":3307},{"style":751},[3308],{"type":612,"value":3224},{"type":606,"tag":636,"props":3310,"children":3311},{"style":745},[3312],{"type":612,"value":1110},{"type":606,"tag":636,"props":3314,"children":3315},{"style":975},[3316],{"type":612,"value":3317}," 10",{"type":606,"tag":636,"props":3319,"children":3320},{"style":751},[3321],{"type":612,"value":818},{"type":606,"tag":636,"props":3323,"children":3325},{"class":638,"line":3324},209,[3326,3330],{"type":606,"tag":636,"props":3327,"children":3328},{"style":745},[3329],{"type":612,"value":2082},{"type":606,"tag":636,"props":3331,"children":3332},{"style":975},[3333],{"type":612,"value":3334}," 0.0\n",{"type":606,"tag":636,"props":3336,"children":3338},{"class":638,"line":3337},210,[3339],{"type":606,"tag":636,"props":3340,"children":3341},{"style":751},[3342],{"type":612,"value":842},{"type":606,"tag":636,"props":3344,"children":3346},{"class":638,"line":3345},211,[3347],{"type":606,"tag":636,"props":3348,"children":3349},{"style":1542},[3350],{"type":612,"value":3351},"    # Calculate shipping cost\n",{"type":606,"tag":636,"props":3353,"children":3355},{"class":638,"line":3354},212,[3356,3361,3365],{"type":606,"tag":636,"props":3357,"children":3358},{"style":751},[3359],{"type":612,"value":3360},"    base_rate ",{"type":606,"tag":636,"props":3362,"children":3363},{"style":745},[3364],{"type":612,"value":1172},{"type":606,"tag":636,"props":3366,"children":3367},{"style":975},[3368],{"type":612,"value":3369}," 5.00\n",{"type":606,"tag":636,"props":3371,"children":3373},{"class":638,"line":3372},213,[3374,3379,3383,3387,3391,3396],{"type":606,"tag":636,"props":3375,"children":3376},{"style":751},[3377],{"type":612,"value":3378},"    weight_rate ",{"type":606,"tag":636,"props":3380,"children":3381},{"style":745},[3382],{"type":612,"value":1172},{"type":606,"tag":636,"props":3384,"children":3385},{"style":751},[3386],{"type":612,"value":3224},{"type":606,"tag":636,"props":3388,"children":3389},{"style":745},[3390],{"type":612,"value":2253},{"type":606,"tag":636,"props":3392,"children":3393},{"style":975},[3394],{"type":612,"value":3395}," 1.50",{"type":606,"tag":636,"props":3397,"children":3398},{"style":1542},[3399],{"type":612,"value":3400},"  # $1.50 per kg\n",{"type":606,"tag":636,"props":3402,"children":3404},{"class":638,"line":3403},214,[3405,3410,3414,3418,3422,3427],{"type":606,"tag":636,"props":3406,"children":3407},{"style":751},[3408],{"type":612,"value":3409},"    distance_rate ",{"type":606,"tag":636,"props":3411,"children":3412},{"style":745},[3413],{"type":612,"value":1172},{"type":606,"tag":636,"props":3415,"children":3416},{"style":751},[3417],{"type":612,"value":3241},{"type":606,"tag":636,"props":3419,"children":3420},{"style":745},[3421],{"type":612,"value":2253},{"type":606,"tag":636,"props":3423,"children":3424},{"style":975},[3425],{"type":612,"value":3426}," 0.05",{"type":606,"tag":636,"props":3428,"children":3429},{"style":1542},[3430],{"type":612,"value":3431},"    # $0.05 per km\n",{"type":606,"tag":636,"props":3433,"children":3435},{"class":638,"line":3434},215,[3436],{"type":606,"tag":636,"props":3437,"children":3438},{"style":751},[3439],{"type":612,"value":842},{"type":606,"tag":636,"props":3441,"children":3443},{"class":638,"line":3442},216,[3444,3449,3453,3458,3463,3468,3472],{"type":606,"tag":636,"props":3445,"children":3446},{"style":751},[3447],{"type":612,"value":3448},"    total_cost ",{"type":606,"tag":636,"props":3450,"children":3451},{"style":745},[3452],{"type":612,"value":1172},{"type":606,"tag":636,"props":3454,"children":3455},{"style":751},[3456],{"type":612,"value":3457}," base_rate ",{"type":606,"tag":636,"props":3459,"children":3460},{"style":745},[3461],{"type":612,"value":3462},"+",{"type":606,"tag":636,"props":3464,"children":3465},{"style":751},[3466],{"type":612,"value":3467}," weight_rate ",{"type":606,"tag":636,"props":3469,"children":3470},{"style":745},[3471],{"type":612,"value":3462},{"type":606,"tag":636,"props":3473,"children":3474},{"style":751},[3475],{"type":612,"value":3476}," distance_rate\n",{"type":606,"tag":636,"props":3478,"children":3480},{"class":638,"line":3479},217,[3481,3486,3490,3495,3499],{"type":606,"tag":636,"props":3482,"children":3483},{"style":745},[3484],{"type":612,"value":3485},"    return",{"type":606,"tag":636,"props":3487,"children":3488},{"style":975},[3489],{"type":612,"value":2526},{"type":606,"tag":636,"props":3491,"children":3492},{"style":751},[3493],{"type":612,"value":3494},"(total_cost, ",{"type":606,"tag":636,"props":3496,"children":3497},{"style":975},[3498],{"type":612,"value":2536},{"type":606,"tag":636,"props":3500,"children":3501},{"style":751},[3502],{"type":612,"value":1147},{"type":606,"tag":636,"props":3504,"children":3506},{"class":638,"line":3505},218,[3507],{"type":606,"tag":636,"props":3508,"children":3509},{"emptyLinePlaceholder":13},[3510],{"type":612,"value":661},{"type":606,"tag":636,"props":3512,"children":3514},{"class":638,"line":3513},219,[3515],{"type":606,"tag":636,"props":3516,"children":3517},{"emptyLinePlaceholder":13},[3518],{"type":612,"value":661},{"type":606,"tag":636,"props":3520,"children":3522},{"class":638,"line":3521},220,[3523,3527,3532,3537,3541,3545,3549],{"type":606,"tag":636,"props":3524,"children":3525},{"style":745},[3526],{"type":612,"value":2951},{"type":606,"tag":636,"props":3528,"children":3529},{"style":810},[3530],{"type":612,"value":3531}," format_order_summary",{"type":606,"tag":636,"props":3533,"children":3534},{"style":751},[3535],{"type":612,"value":3536},"(cart: ShoppingCart, customer_name: ",{"type":606,"tag":636,"props":3538,"children":3539},{"style":975},[3540],{"type":612,"value":1248},{"type":606,"tag":636,"props":3542,"children":3543},{"style":751},[3544],{"type":612,"value":1281},{"type":606,"tag":636,"props":3546,"children":3547},{"style":975},[3548],{"type":612,"value":1248},{"type":606,"tag":636,"props":3550,"children":3551},{"style":751},[3552],{"type":612,"value":818},{"type":606,"tag":636,"props":3554,"children":3556},{"class":638,"line":3555},221,[3557],{"type":606,"tag":636,"props":3558,"children":3559},{"style":642},[3560],{"type":612,"value":826},{"type":606,"tag":636,"props":3562,"children":3564},{"class":638,"line":3563},222,[3565],{"type":606,"tag":636,"props":3566,"children":3567},{"style":642},[3568],{"type":612,"value":3569},"    Generate a formatted order summary for display or printing.\n",{"type":606,"tag":636,"props":3571,"children":3573},{"class":638,"line":3572},223,[3574],{"type":606,"tag":636,"props":3575,"children":3576},{"style":642},[3577],{"type":612,"value":842},{"type":606,"tag":636,"props":3579,"children":3581},{"class":638,"line":3580},224,[3582],{"type":606,"tag":636,"props":3583,"children":3584},{"style":642},[3585],{"type":612,"value":3046},{"type":606,"tag":636,"props":3587,"children":3589},{"class":638,"line":3588},225,[3590],{"type":606,"tag":636,"props":3591,"children":3592},{"style":642},[3593],{"type":612,"value":3594},"        cart (ShoppingCart): The shopping cart to summarize\n",{"type":606,"tag":636,"props":3596,"children":3598},{"class":638,"line":3597},226,[3599],{"type":606,"tag":636,"props":3600,"children":3601},{"style":642},[3602],{"type":612,"value":3603},"        customer_name (str): Name of the customer\n",{"type":606,"tag":636,"props":3605,"children":3607},{"class":638,"line":3606},227,[3608],{"type":606,"tag":636,"props":3609,"children":3610},{"style":642},[3611],{"type":612,"value":897},{"type":606,"tag":636,"props":3613,"children":3615},{"class":638,"line":3614},228,[3616],{"type":606,"tag":636,"props":3617,"children":3618},{"style":642},[3619],{"type":612,"value":3081},{"type":606,"tag":636,"props":3621,"children":3623},{"class":638,"line":3622},229,[3624],{"type":606,"tag":636,"props":3625,"children":3626},{"style":642},[3627],{"type":612,"value":3628},"        str: Formatted order summary as a multi-line string\n",{"type":606,"tag":636,"props":3630,"children":3632},{"class":638,"line":3631},230,[3633],{"type":606,"tag":636,"props":3634,"children":3635},{"style":642},[3636],{"type":612,"value":897},{"type":606,"tag":636,"props":3638,"children":3640},{"class":638,"line":3639},231,[3641],{"type":606,"tag":636,"props":3642,"children":3643},{"style":642},[3644],{"type":612,"value":905},{"type":606,"tag":636,"props":3646,"children":3648},{"class":638,"line":3647},232,[3649,3653],{"type":606,"tag":636,"props":3650,"children":3651},{"style":745},[3652],{"type":612,"value":913},{"type":606,"tag":636,"props":3654,"children":3655},{"style":642},[3656],{"type":612,"value":918},{"type":606,"tag":636,"props":3658,"children":3660},{"class":638,"line":3659},233,[3661,3665],{"type":606,"tag":636,"props":3662,"children":3663},{"style":745},[3664],{"type":612,"value":913},{"type":606,"tag":636,"props":3666,"children":3667},{"style":642},[3668],{"type":612,"value":3669},"cart.add_item(\"Book\", 19.99, 2)\n",{"type":606,"tag":636,"props":3671,"children":3673},{"class":638,"line":3672},234,[3674,3678],{"type":606,"tag":636,"props":3675,"children":3676},{"style":745},[3677],{"type":612,"value":913},{"type":606,"tag":636,"props":3679,"children":3680},{"style":642},[3681],{"type":612,"value":3682},"summary = format_order_summary(cart, \"Alice\")\n",{"type":606,"tag":636,"props":3684,"children":3686},{"class":638,"line":3685},235,[3687,3691],{"type":606,"tag":636,"props":3688,"children":3689},{"style":745},[3690],{"type":612,"value":913},{"type":606,"tag":636,"props":3692,"children":3693},{"style":642},[3694],{"type":612,"value":3695},"print(summary)\n",{"type":606,"tag":636,"props":3697,"children":3699},{"class":638,"line":3698},236,[3700],{"type":606,"tag":636,"props":3701,"children":3702},{"style":642},[3703],{"type":612,"value":3704},"        Order Summary for Alice\n",{"type":606,"tag":636,"props":3706,"children":3708},{"class":638,"line":3707},237,[3709],{"type":606,"tag":636,"props":3710,"children":3711},{"style":642},[3712],{"type":612,"value":3713},"        =======================\n",{"type":606,"tag":636,"props":3715,"children":3717},{"class":638,"line":3716},238,[3718],{"type":606,"tag":636,"props":3719,"children":3720},{"style":642},[3721],{"type":612,"value":3722},"        - Book x2: $39.98\n",{"type":606,"tag":636,"props":3724,"children":3726},{"class":638,"line":3725},239,[3727],{"type":606,"tag":636,"props":3728,"children":3729},{"style":642},[3730],{"type":612,"value":897},{"type":606,"tag":636,"props":3732,"children":3734},{"class":638,"line":3733},240,[3735],{"type":606,"tag":636,"props":3736,"children":3737},{"style":642},[3738],{"type":612,"value":3739},"        Subtotal: $39.98\n",{"type":606,"tag":636,"props":3741,"children":3743},{"class":638,"line":3742},241,[3744],{"type":606,"tag":636,"props":3745,"children":3746},{"style":642},[3747],{"type":612,"value":3748},"        Total: $39.98\n",{"type":606,"tag":636,"props":3750,"children":3752},{"class":638,"line":3751},242,[3753],{"type":606,"tag":636,"props":3754,"children":3755},{"style":642},[3756],{"type":612,"value":826},{"type":606,"tag":636,"props":3758,"children":3760},{"class":638,"line":3759},243,[3761],{"type":606,"tag":636,"props":3762,"children":3763},{"style":1542},[3764],{"type":612,"value":3765},"    # Build the summary string\n",{"type":606,"tag":636,"props":3767,"children":3769},{"class":638,"line":3768},244,[3770,3775,3779],{"type":606,"tag":636,"props":3771,"children":3772},{"style":751},[3773],{"type":612,"value":3774},"    lines ",{"type":606,"tag":636,"props":3776,"children":3777},{"style":745},[3778],{"type":612,"value":1172},{"type":606,"tag":636,"props":3780,"children":3781},{"style":751},[3782],{"type":612,"value":3783}," [\n",{"type":606,"tag":636,"props":3785,"children":3787},{"class":638,"line":3786},245,[3788,3793,3798,3803,3808,3813,3818],{"type":606,"tag":636,"props":3789,"children":3790},{"style":745},[3791],{"type":612,"value":3792},"        f",{"type":606,"tag":636,"props":3794,"children":3795},{"style":642},[3796],{"type":612,"value":3797},"\"Order Summary for ",{"type":606,"tag":636,"props":3799,"children":3800},{"style":975},[3801],{"type":612,"value":3802},"{",{"type":606,"tag":636,"props":3804,"children":3805},{"style":751},[3806],{"type":612,"value":3807},"customer_name",{"type":606,"tag":636,"props":3809,"children":3810},{"style":975},[3811],{"type":612,"value":3812},"}",{"type":606,"tag":636,"props":3814,"children":3815},{"style":642},[3816],{"type":612,"value":3817},"\"",{"type":606,"tag":636,"props":3819,"children":3820},{"style":751},[3821],{"type":612,"value":3822},",\n",{"type":606,"tag":636,"props":3824,"children":3826},{"class":638,"line":3825},246,[3827,3832,3837,3842,3847,3852,3856,3861,3866],{"type":606,"tag":636,"props":3828,"children":3829},{"style":642},[3830],{"type":612,"value":3831},"        \"=\"",{"type":606,"tag":636,"props":3833,"children":3834},{"style":745},[3835],{"type":612,"value":3836}," *",{"type":606,"tag":636,"props":3838,"children":3839},{"style":751},[3840],{"type":612,"value":3841}," (",{"type":606,"tag":636,"props":3843,"children":3844},{"style":975},[3845],{"type":612,"value":3846},"len",{"type":606,"tag":636,"props":3848,"children":3849},{"style":751},[3850],{"type":612,"value":3851},"(customer_name) ",{"type":606,"tag":636,"props":3853,"children":3854},{"style":745},[3855],{"type":612,"value":3462},{"type":606,"tag":636,"props":3857,"children":3858},{"style":975},[3859],{"type":612,"value":3860}," 17",{"type":606,"tag":636,"props":3862,"children":3863},{"style":751},[3864],{"type":612,"value":3865},"),  ",{"type":606,"tag":636,"props":3867,"children":3868},{"style":1542},[3869],{"type":612,"value":3870},"# Adjust line length\n",{"type":606,"tag":636,"props":3872,"children":3874},{"class":638,"line":3873},247,[3875],{"type":606,"tag":636,"props":3876,"children":3877},{"style":642},[3878],{"type":612,"value":3879},"        \"\"\n",{"type":606,"tag":636,"props":3881,"children":3883},{"class":638,"line":3882},248,[3884],{"type":606,"tag":636,"props":3885,"children":3886},{"style":751},[3887],{"type":612,"value":3888},"    ]\n",{"type":606,"tag":636,"props":3890,"children":3892},{"class":638,"line":3891},249,[3893],{"type":606,"tag":636,"props":3894,"children":3895},{"style":751},[3896],{"type":612,"value":842},{"type":606,"tag":636,"props":3898,"children":3900},{"class":638,"line":3899},250,[3901],{"type":606,"tag":636,"props":3902,"children":3903},{"style":1542},[3904],{"type":612,"value":3905},"    # Add each item\n",{"type":606,"tag":636,"props":3907,"children":3909},{"class":638,"line":3908},251,[3910,3915,3919,3923],{"type":606,"tag":636,"props":3911,"children":3912},{"style":745},[3913],{"type":612,"value":3914},"    for",{"type":606,"tag":636,"props":3916,"children":3917},{"style":751},[3918],{"type":612,"value":1559},{"type":606,"tag":636,"props":3920,"children":3921},{"style":745},[3922],{"type":612,"value":1564},{"type":606,"tag":636,"props":3924,"children":3925},{"style":751},[3926],{"type":612,"value":3927}," cart.items:\n",{"type":606,"tag":636,"props":3929,"children":3931},{"class":638,"line":3930},252,[3932,3937,3941,3945,3949,3953,3957,3961,3965],{"type":606,"tag":636,"props":3933,"children":3934},{"style":751},[3935],{"type":612,"value":3936},"        item_total ",{"type":606,"tag":636,"props":3938,"children":3939},{"style":745},[3940],{"type":612,"value":1172},{"type":606,"tag":636,"props":3942,"children":3943},{"style":751},[3944],{"type":612,"value":1588},{"type":606,"tag":636,"props":3946,"children":3947},{"style":642},[3948],{"type":612,"value":1622},{"type":606,"tag":636,"props":3950,"children":3951},{"style":751},[3952],{"type":612,"value":1598},{"type":606,"tag":636,"props":3954,"children":3955},{"style":745},[3956],{"type":612,"value":2253},{"type":606,"tag":636,"props":3958,"children":3959},{"style":751},[3960],{"type":612,"value":1588},{"type":606,"tag":636,"props":3962,"children":3963},{"style":642},[3964],{"type":612,"value":1649},{"type":606,"tag":636,"props":3966,"children":3967},{"style":751},[3968],{"type":612,"value":3969},"]\n",{"type":606,"tag":636,"props":3971,"children":3973},{"class":638,"line":3972},253,[3974,3979,3983,3988,3993,3997,4002,4006,4011,4015,4020,4024,4028,4032,4036,4040,4045,4049,4054,4059,4063],{"type":606,"tag":636,"props":3975,"children":3976},{"style":751},[3977],{"type":612,"value":3978},"        line ",{"type":606,"tag":636,"props":3980,"children":3981},{"style":745},[3982],{"type":612,"value":1172},{"type":606,"tag":636,"props":3984,"children":3985},{"style":745},[3986],{"type":612,"value":3987}," f",{"type":606,"tag":636,"props":3989,"children":3990},{"style":642},[3991],{"type":612,"value":3992},"\"- ",{"type":606,"tag":636,"props":3994,"children":3995},{"style":975},[3996],{"type":612,"value":3802},{"type":606,"tag":636,"props":3998,"children":3999},{"style":751},[4000],{"type":612,"value":4001},"item[",{"type":606,"tag":636,"props":4003,"children":4004},{"style":642},[4005],{"type":612,"value":1593},{"type":606,"tag":636,"props":4007,"children":4008},{"style":751},[4009],{"type":612,"value":4010},"]",{"type":606,"tag":636,"props":4012,"children":4013},{"style":975},[4014],{"type":612,"value":3812},{"type":606,"tag":636,"props":4016,"children":4017},{"style":642},[4018],{"type":612,"value":4019}," x",{"type":606,"tag":636,"props":4021,"children":4022},{"style":975},[4023],{"type":612,"value":3802},{"type":606,"tag":636,"props":4025,"children":4026},{"style":751},[4027],{"type":612,"value":4001},{"type":606,"tag":636,"props":4029,"children":4030},{"style":642},[4031],{"type":612,"value":1649},{"type":606,"tag":636,"props":4033,"children":4034},{"style":751},[4035],{"type":612,"value":4010},{"type":606,"tag":636,"props":4037,"children":4038},{"style":975},[4039],{"type":612,"value":3812},{"type":606,"tag":636,"props":4041,"children":4042},{"style":642},[4043],{"type":612,"value":4044},": $",{"type":606,"tag":636,"props":4046,"children":4047},{"style":975},[4048],{"type":612,"value":3802},{"type":606,"tag":636,"props":4050,"children":4051},{"style":751},[4052],{"type":612,"value":4053},"item_total",{"type":606,"tag":636,"props":4055,"children":4056},{"style":745},[4057],{"type":612,"value":4058},":.2f",{"type":606,"tag":636,"props":4060,"children":4061},{"style":975},[4062],{"type":612,"value":3812},{"type":606,"tag":636,"props":4064,"children":4065},{"style":642},[4066],{"type":612,"value":4067},"\"\n",{"type":606,"tag":636,"props":4069,"children":4071},{"class":638,"line":4070},254,[4072],{"type":606,"tag":636,"props":4073,"children":4074},{"style":751},[4075],{"type":612,"value":4076},"        lines.append(line)\n",{"type":606,"tag":636,"props":4078,"children":4080},{"class":638,"line":4079},255,[4081],{"type":606,"tag":636,"props":4082,"children":4083},{"style":751},[4084],{"type":612,"value":842},{"type":606,"tag":636,"props":4086,"children":4088},{"class":638,"line":4087},256,[4089],{"type":606,"tag":636,"props":4090,"children":4091},{"style":1542},[4092],{"type":612,"value":4093},"    # Add totals\n",{"type":606,"tag":636,"props":4095,"children":4097},{"class":638,"line":4096},257,[4098],{"type":606,"tag":636,"props":4099,"children":4100},{"style":751},[4101],{"type":612,"value":4102},"    lines.extend([\n",{"type":606,"tag":636,"props":4104,"children":4106},{"class":638,"line":4105},258,[4107,4112],{"type":606,"tag":636,"props":4108,"children":4109},{"style":642},[4110],{"type":612,"value":4111},"        \"\"",{"type":606,"tag":636,"props":4113,"children":4114},{"style":751},[4115],{"type":612,"value":3822},{"type":606,"tag":636,"props":4117,"children":4119},{"class":638,"line":4118},259,[4120,4124,4129,4133,4138,4142,4146,4150],{"type":606,"tag":636,"props":4121,"children":4122},{"style":745},[4123],{"type":612,"value":3792},{"type":606,"tag":636,"props":4125,"children":4126},{"style":642},[4127],{"type":612,"value":4128},"\"Subtotal: $",{"type":606,"tag":636,"props":4130,"children":4131},{"style":975},[4132],{"type":612,"value":3802},{"type":606,"tag":636,"props":4134,"children":4135},{"style":751},[4136],{"type":612,"value":4137},"cart.get_subtotal()",{"type":606,"tag":636,"props":4139,"children":4140},{"style":745},[4141],{"type":612,"value":4058},{"type":606,"tag":636,"props":4143,"children":4144},{"style":975},[4145],{"type":612,"value":3812},{"type":606,"tag":636,"props":4147,"children":4148},{"style":642},[4149],{"type":612,"value":3817},{"type":606,"tag":636,"props":4151,"children":4152},{"style":751},[4153],{"type":612,"value":3822},{"type":606,"tag":636,"props":4155,"children":4157},{"class":638,"line":4156},260,[4158,4162,4167,4171,4176,4180,4184],{"type":606,"tag":636,"props":4159,"children":4160},{"style":745},[4161],{"type":612,"value":3792},{"type":606,"tag":636,"props":4163,"children":4164},{"style":642},[4165],{"type":612,"value":4166},"\"Total: $",{"type":606,"tag":636,"props":4168,"children":4169},{"style":975},[4170],{"type":612,"value":3802},{"type":606,"tag":636,"props":4172,"children":4173},{"style":751},[4174],{"type":612,"value":4175},"cart.get_total()",{"type":606,"tag":636,"props":4177,"children":4178},{"style":745},[4179],{"type":612,"value":4058},{"type":606,"tag":636,"props":4181,"children":4182},{"style":975},[4183],{"type":612,"value":3812},{"type":606,"tag":636,"props":4185,"children":4186},{"style":642},[4187],{"type":612,"value":4067},{"type":606,"tag":636,"props":4189,"children":4191},{"class":638,"line":4190},261,[4192],{"type":606,"tag":636,"props":4193,"children":4194},{"style":751},[4195],{"type":612,"value":4196},"    ])\n",{"type":606,"tag":636,"props":4198,"children":4200},{"class":638,"line":4199},262,[4201],{"type":606,"tag":636,"props":4202,"children":4203},{"style":751},[4204],{"type":612,"value":842},{"type":606,"tag":636,"props":4206,"children":4208},{"class":638,"line":4207},263,[4209,4213,4218,4223,4227],{"type":606,"tag":636,"props":4210,"children":4211},{"style":745},[4212],{"type":612,"value":3485},{"type":606,"tag":636,"props":4214,"children":4215},{"style":642},[4216],{"type":612,"value":4217}," \"",{"type":606,"tag":636,"props":4219,"children":4220},{"style":975},[4221],{"type":612,"value":4222},"\\n",{"type":606,"tag":636,"props":4224,"children":4225},{"style":642},[4226],{"type":612,"value":3817},{"type":606,"tag":636,"props":4228,"children":4229},{"style":751},[4230],{"type":612,"value":4231},".join(lines)\n",{"type":606,"tag":636,"props":4233,"children":4235},{"class":638,"line":4234},264,[4236],{"type":606,"tag":636,"props":4237,"children":4238},{"emptyLinePlaceholder":13},[4239],{"type":612,"value":661},{"type":606,"tag":636,"props":4241,"children":4243},{"class":638,"line":4242},265,[4244],{"type":606,"tag":636,"props":4245,"children":4246},{"emptyLinePlaceholder":13},[4247],{"type":612,"value":661},{"type":606,"tag":636,"props":4249,"children":4251},{"class":638,"line":4250},266,[4252],{"type":606,"tag":636,"props":4253,"children":4254},{"style":1542},[4255],{"type":612,"value":4256},"# Example usage with detailed comments\n",{"type":606,"tag":636,"props":4258,"children":4260},{"class":638,"line":4259},267,[4261,4265,4270],{"type":606,"tag":636,"props":4262,"children":4263},{"style":745},[4264],{"type":612,"value":2951},{"type":606,"tag":636,"props":4266,"children":4267},{"style":810},[4268],{"type":612,"value":4269}," demonstrate_shopping_cart",{"type":606,"tag":636,"props":4271,"children":4272},{"style":751},[4273],{"type":612,"value":4274},"():\n",{"type":606,"tag":636,"props":4276,"children":4278},{"class":638,"line":4277},268,[4279],{"type":606,"tag":636,"props":4280,"children":4281},{"style":642},[4282],{"type":612,"value":826},{"type":606,"tag":636,"props":4284,"children":4286},{"class":638,"line":4285},269,[4287],{"type":606,"tag":636,"props":4288,"children":4289},{"style":642},[4290],{"type":612,"value":4291},"    Demonstrate the shopping cart functionality.\n",{"type":606,"tag":636,"props":4293,"children":4295},{"class":638,"line":4294},270,[4296],{"type":606,"tag":636,"props":4297,"children":4298},{"style":642},[4299],{"type":612,"value":842},{"type":606,"tag":636,"props":4301,"children":4303},{"class":638,"line":4302},271,[4304],{"type":606,"tag":636,"props":4305,"children":4306},{"style":642},[4307],{"type":612,"value":4308},"    This function shows how to use the ShoppingCart class and related\n",{"type":606,"tag":636,"props":4310,"children":4312},{"class":638,"line":4311},272,[4313],{"type":606,"tag":636,"props":4314,"children":4315},{"style":642},[4316],{"type":612,"value":4317},"    functions to create a complete shopping experience.\n",{"type":606,"tag":636,"props":4319,"children":4321},{"class":638,"line":4320},273,[4322],{"type":606,"tag":636,"props":4323,"children":4324},{"style":642},[4325],{"type":612,"value":826},{"type":606,"tag":636,"props":4327,"children":4329},{"class":638,"line":4328},274,[4330,4335,4339,4344],{"type":606,"tag":636,"props":4331,"children":4332},{"style":975},[4333],{"type":612,"value":4334},"    print",{"type":606,"tag":636,"props":4336,"children":4337},{"style":751},[4338],{"type":612,"value":1137},{"type":606,"tag":636,"props":4340,"children":4341},{"style":642},[4342],{"type":612,"value":4343},"\"Shopping Cart Documentation Example\"",{"type":606,"tag":636,"props":4345,"children":4346},{"style":751},[4347],{"type":612,"value":1147},{"type":606,"tag":636,"props":4349,"children":4351},{"class":638,"line":4350},275,[4352,4356,4360,4365,4369,4374],{"type":606,"tag":636,"props":4353,"children":4354},{"style":975},[4355],{"type":612,"value":4334},{"type":606,"tag":636,"props":4357,"children":4358},{"style":751},[4359],{"type":612,"value":1137},{"type":606,"tag":636,"props":4361,"children":4362},{"style":642},[4363],{"type":612,"value":4364},"\"=\"",{"type":606,"tag":636,"props":4366,"children":4367},{"style":745},[4368],{"type":612,"value":3836},{"type":606,"tag":636,"props":4370,"children":4371},{"style":975},[4372],{"type":612,"value":4373}," 40",{"type":606,"tag":636,"props":4375,"children":4376},{"style":751},[4377],{"type":612,"value":1147},{"type":606,"tag":636,"props":4379,"children":4381},{"class":638,"line":4380},276,[4382],{"type":606,"tag":636,"props":4383,"children":4384},{"style":751},[4385],{"type":612,"value":842},{"type":606,"tag":636,"props":4387,"children":4389},{"class":638,"line":4388},277,[4390],{"type":606,"tag":636,"props":4391,"children":4392},{"style":1542},[4393],{"type":612,"value":4394},"    # Create a cart with 10% discount\n",{"type":606,"tag":636,"props":4396,"children":4398},{"class":638,"line":4397},278,[4399,4404,4408,4413,4419,4423,4428],{"type":606,"tag":636,"props":4400,"children":4401},{"style":751},[4402],{"type":612,"value":4403},"    cart ",{"type":606,"tag":636,"props":4405,"children":4406},{"style":745},[4407],{"type":612,"value":1172},{"type":606,"tag":636,"props":4409,"children":4410},{"style":751},[4411],{"type":612,"value":4412}," ShoppingCart(",{"type":606,"tag":636,"props":4414,"children":4416},{"style":4415},"--shiki-default:#E36209;--shiki-app-dark-mode:#FFAB70",[4417],{"type":612,"value":4418},"discount_rate",{"type":606,"tag":636,"props":4420,"children":4421},{"style":745},[4422],{"type":612,"value":1172},{"type":606,"tag":636,"props":4424,"children":4425},{"style":975},[4426],{"type":612,"value":4427},"0.10",{"type":606,"tag":636,"props":4429,"children":4430},{"style":751},[4431],{"type":612,"value":1147},{"type":606,"tag":636,"props":4433,"children":4435},{"class":638,"line":4434},279,[4436],{"type":606,"tag":636,"props":4437,"children":4438},{"style":751},[4439],{"type":612,"value":842},{"type":606,"tag":636,"props":4441,"children":4443},{"class":638,"line":4442},280,[4444],{"type":606,"tag":636,"props":4445,"children":4446},{"style":1542},[4447],{"type":612,"value":4448},"    # Add some items to the cart\n",{"type":606,"tag":636,"props":4450,"children":4452},{"class":638,"line":4451},281,[4453,4458,4463,4468,4473,4477,4482],{"type":606,"tag":636,"props":4454,"children":4455},{"style":751},[4456],{"type":612,"value":4457},"    cart.add_item(",{"type":606,"tag":636,"props":4459,"children":4460},{"style":642},[4461],{"type":612,"value":4462},"\"Programming Book\"",{"type":606,"tag":636,"props":4464,"children":4465},{"style":751},[4466],{"type":612,"value":4467},", ",{"type":606,"tag":636,"props":4469,"children":4470},{"style":975},[4471],{"type":612,"value":4472},"45.99",{"type":606,"tag":636,"props":4474,"children":4475},{"style":751},[4476],{"type":612,"value":4467},{"type":606,"tag":636,"props":4478,"children":4479},{"style":975},[4480],{"type":612,"value":4481},"1",{"type":606,"tag":636,"props":4483,"children":4484},{"style":751},[4485],{"type":612,"value":1147},{"type":606,"tag":636,"props":4487,"children":4489},{"class":638,"line":4488},282,[4490,4494,4499,4503,4508,4512,4516],{"type":606,"tag":636,"props":4491,"children":4492},{"style":751},[4493],{"type":612,"value":4457},{"type":606,"tag":636,"props":4495,"children":4496},{"style":642},[4497],{"type":612,"value":4498},"\"Wireless Mouse\"",{"type":606,"tag":636,"props":4500,"children":4501},{"style":751},[4502],{"type":612,"value":4467},{"type":606,"tag":636,"props":4504,"children":4505},{"style":975},[4506],{"type":612,"value":4507},"29.95",{"type":606,"tag":636,"props":4509,"children":4510},{"style":751},[4511],{"type":612,"value":4467},{"type":606,"tag":636,"props":4513,"children":4514},{"style":975},[4515],{"type":612,"value":2536},{"type":606,"tag":636,"props":4517,"children":4518},{"style":751},[4519],{"type":612,"value":1147},{"type":606,"tag":636,"props":4521,"children":4523},{"class":638,"line":4522},283,[4524,4528,4533,4537,4542,4546,4551],{"type":606,"tag":636,"props":4525,"children":4526},{"style":751},[4527],{"type":612,"value":4457},{"type":606,"tag":636,"props":4529,"children":4530},{"style":642},[4531],{"type":612,"value":4532},"\"USB Cable\"",{"type":606,"tag":636,"props":4534,"children":4535},{"style":751},[4536],{"type":612,"value":4467},{"type":606,"tag":636,"props":4538,"children":4539},{"style":975},[4540],{"type":612,"value":4541},"12.50",{"type":606,"tag":636,"props":4543,"children":4544},{"style":751},[4545],{"type":612,"value":4467},{"type":606,"tag":636,"props":4547,"children":4548},{"style":975},[4549],{"type":612,"value":4550},"3",{"type":606,"tag":636,"props":4552,"children":4553},{"style":751},[4554],{"type":612,"value":1147},{"type":606,"tag":636,"props":4556,"children":4558},{"class":638,"line":4557},284,[4559],{"type":606,"tag":636,"props":4560,"children":4561},{"style":751},[4562],{"type":612,"value":842},{"type":606,"tag":636,"props":4564,"children":4566},{"class":638,"line":4565},285,[4567],{"type":606,"tag":636,"props":4568,"children":4569},{"style":1542},[4570],{"type":612,"value":4571},"    # Display cart information\n",{"type":606,"tag":636,"props":4573,"children":4575},{"class":638,"line":4574},286,[4576,4580,4584,4589,4594,4598,4603,4607,4611],{"type":606,"tag":636,"props":4577,"children":4578},{"style":975},[4579],{"type":612,"value":4334},{"type":606,"tag":636,"props":4581,"children":4582},{"style":751},[4583],{"type":612,"value":1137},{"type":606,"tag":636,"props":4585,"children":4586},{"style":745},[4587],{"type":612,"value":4588},"f",{"type":606,"tag":636,"props":4590,"children":4591},{"style":642},[4592],{"type":612,"value":4593},"\"Items in cart: ",{"type":606,"tag":636,"props":4595,"children":4596},{"style":975},[4597],{"type":612,"value":3802},{"type":606,"tag":636,"props":4599,"children":4600},{"style":751},[4601],{"type":612,"value":4602},"cart.get_item_count()",{"type":606,"tag":636,"props":4604,"children":4605},{"style":975},[4606],{"type":612,"value":3812},{"type":606,"tag":636,"props":4608,"children":4609},{"style":642},[4610],{"type":612,"value":3817},{"type":606,"tag":636,"props":4612,"children":4613},{"style":751},[4614],{"type":612,"value":1147},{"type":606,"tag":636,"props":4616,"children":4618},{"class":638,"line":4617},287,[4619,4623,4627,4631,4635,4639,4643,4647,4651,4655],{"type":606,"tag":636,"props":4620,"children":4621},{"style":975},[4622],{"type":612,"value":4334},{"type":606,"tag":636,"props":4624,"children":4625},{"style":751},[4626],{"type":612,"value":1137},{"type":606,"tag":636,"props":4628,"children":4629},{"style":745},[4630],{"type":612,"value":4588},{"type":606,"tag":636,"props":4632,"children":4633},{"style":642},[4634],{"type":612,"value":4128},{"type":606,"tag":636,"props":4636,"children":4637},{"style":975},[4638],{"type":612,"value":3802},{"type":606,"tag":636,"props":4640,"children":4641},{"style":751},[4642],{"type":612,"value":4137},{"type":606,"tag":636,"props":4644,"children":4645},{"style":745},[4646],{"type":612,"value":4058},{"type":606,"tag":636,"props":4648,"children":4649},{"style":975},[4650],{"type":612,"value":3812},{"type":606,"tag":636,"props":4652,"children":4653},{"style":642},[4654],{"type":612,"value":3817},{"type":606,"tag":636,"props":4656,"children":4657},{"style":751},[4658],{"type":612,"value":1147},{"type":606,"tag":636,"props":4660,"children":4662},{"class":638,"line":4661},288,[4663,4667,4671,4675,4680,4684,4688,4692,4696,4700],{"type":606,"tag":636,"props":4664,"children":4665},{"style":975},[4666],{"type":612,"value":4334},{"type":606,"tag":636,"props":4668,"children":4669},{"style":751},[4670],{"type":612,"value":1137},{"type":606,"tag":636,"props":4672,"children":4673},{"style":745},[4674],{"type":612,"value":4588},{"type":606,"tag":636,"props":4676,"children":4677},{"style":642},[4678],{"type":612,"value":4679},"\"Total after discount: $",{"type":606,"tag":636,"props":4681,"children":4682},{"style":975},[4683],{"type":612,"value":3802},{"type":606,"tag":636,"props":4685,"children":4686},{"style":751},[4687],{"type":612,"value":4175},{"type":606,"tag":636,"props":4689,"children":4690},{"style":745},[4691],{"type":612,"value":4058},{"type":606,"tag":636,"props":4693,"children":4694},{"style":975},[4695],{"type":612,"value":3812},{"type":606,"tag":636,"props":4697,"children":4698},{"style":642},[4699],{"type":612,"value":3817},{"type":606,"tag":636,"props":4701,"children":4702},{"style":751},[4703],{"type":612,"value":1147},{"type":606,"tag":636,"props":4705,"children":4707},{"class":638,"line":4706},289,[4708,4712,4716,4720,4725,4729,4734,4738,4742],{"type":606,"tag":636,"props":4709,"children":4710},{"style":975},[4711],{"type":612,"value":4334},{"type":606,"tag":636,"props":4713,"children":4714},{"style":751},[4715],{"type":612,"value":1137},{"type":606,"tag":636,"props":4717,"children":4718},{"style":745},[4719],{"type":612,"value":4588},{"type":606,"tag":636,"props":4721,"children":4722},{"style":642},[4723],{"type":612,"value":4724},"\"Cart empty: ",{"type":606,"tag":636,"props":4726,"children":4727},{"style":975},[4728],{"type":612,"value":3802},{"type":606,"tag":636,"props":4730,"children":4731},{"style":751},[4732],{"type":612,"value":4733},"cart.is_empty()",{"type":606,"tag":636,"props":4735,"children":4736},{"style":975},[4737],{"type":612,"value":3812},{"type":606,"tag":636,"props":4739,"children":4740},{"style":642},[4741],{"type":612,"value":3817},{"type":606,"tag":636,"props":4743,"children":4744},{"style":751},[4745],{"type":612,"value":1147},{"type":606,"tag":636,"props":4747,"children":4749},{"class":638,"line":4748},290,[4750],{"type":606,"tag":636,"props":4751,"children":4752},{"style":751},[4753],{"type":612,"value":842},{"type":606,"tag":636,"props":4755,"children":4757},{"class":638,"line":4756},291,[4758],{"type":606,"tag":636,"props":4759,"children":4760},{"style":1542},[4761],{"type":612,"value":4762},"    # Calculate shipping\n",{"type":606,"tag":636,"props":4764,"children":4766},{"class":638,"line":4765},292,[4767,4772,4776,4781],{"type":606,"tag":636,"props":4768,"children":4769},{"style":751},[4770],{"type":612,"value":4771},"    total_weight ",{"type":606,"tag":636,"props":4773,"children":4774},{"style":745},[4775],{"type":612,"value":1172},{"type":606,"tag":636,"props":4777,"children":4778},{"style":975},[4779],{"type":612,"value":4780}," 2.8",{"type":606,"tag":636,"props":4782,"children":4783},{"style":1542},[4784],{"type":612,"value":4785},"  # kg\n",{"type":606,"tag":636,"props":4787,"children":4789},{"class":638,"line":4788},293,[4790,4795,4799,4804],{"type":606,"tag":636,"props":4791,"children":4792},{"style":751},[4793],{"type":612,"value":4794},"    shipping_distance ",{"type":606,"tag":636,"props":4796,"children":4797},{"style":745},[4798],{"type":612,"value":1172},{"type":606,"tag":636,"props":4800,"children":4801},{"style":975},[4802],{"type":612,"value":4803}," 150",{"type":606,"tag":636,"props":4805,"children":4806},{"style":1542},[4807],{"type":612,"value":4808},"  # km\n",{"type":606,"tag":636,"props":4810,"children":4812},{"class":638,"line":4811},294,[4813,4818,4822],{"type":606,"tag":636,"props":4814,"children":4815},{"style":751},[4816],{"type":612,"value":4817},"    shipping_cost ",{"type":606,"tag":636,"props":4819,"children":4820},{"style":745},[4821],{"type":612,"value":1172},{"type":606,"tag":636,"props":4823,"children":4824},{"style":751},[4825],{"type":612,"value":4826}," calculate_shipping_cost(total_weight, shipping_distance)\n",{"type":606,"tag":636,"props":4828,"children":4830},{"class":638,"line":4829},295,[4831,4835,4839,4843,4848,4852,4857,4861,4865,4869],{"type":606,"tag":636,"props":4832,"children":4833},{"style":975},[4834],{"type":612,"value":4334},{"type":606,"tag":636,"props":4836,"children":4837},{"style":751},[4838],{"type":612,"value":1137},{"type":606,"tag":636,"props":4840,"children":4841},{"style":745},[4842],{"type":612,"value":4588},{"type":606,"tag":636,"props":4844,"children":4845},{"style":642},[4846],{"type":612,"value":4847},"\"Shipping cost: $",{"type":606,"tag":636,"props":4849,"children":4850},{"style":975},[4851],{"type":612,"value":3802},{"type":606,"tag":636,"props":4853,"children":4854},{"style":751},[4855],{"type":612,"value":4856},"shipping_cost",{"type":606,"tag":636,"props":4858,"children":4859},{"style":745},[4860],{"type":612,"value":4058},{"type":606,"tag":636,"props":4862,"children":4863},{"style":975},[4864],{"type":612,"value":3812},{"type":606,"tag":636,"props":4866,"children":4867},{"style":642},[4868],{"type":612,"value":3817},{"type":606,"tag":636,"props":4870,"children":4871},{"style":751},[4872],{"type":612,"value":1147},{"type":606,"tag":636,"props":4874,"children":4876},{"class":638,"line":4875},296,[4877],{"type":606,"tag":636,"props":4878,"children":4879},{"style":751},[4880],{"type":612,"value":842},{"type":606,"tag":636,"props":4882,"children":4884},{"class":638,"line":4883},297,[4885],{"type":606,"tag":636,"props":4886,"children":4887},{"style":1542},[4888],{"type":612,"value":4889},"    # Generate order summary\n",{"type":606,"tag":636,"props":4891,"children":4893},{"class":638,"line":4892},298,[4894,4899,4903,4908,4913],{"type":606,"tag":636,"props":4895,"children":4896},{"style":751},[4897],{"type":612,"value":4898},"    summary ",{"type":606,"tag":636,"props":4900,"children":4901},{"style":745},[4902],{"type":612,"value":1172},{"type":606,"tag":636,"props":4904,"children":4905},{"style":751},[4906],{"type":612,"value":4907}," format_order_summary(cart, ",{"type":606,"tag":636,"props":4909,"children":4910},{"style":642},[4911],{"type":612,"value":4912},"\"John Doe\"",{"type":606,"tag":636,"props":4914,"children":4915},{"style":751},[4916],{"type":612,"value":1147},{"type":606,"tag":636,"props":4918,"children":4920},{"class":638,"line":4919},299,[4921,4925,4929,4933,4937,4941,4946],{"type":606,"tag":636,"props":4922,"children":4923},{"style":975},[4924],{"type":612,"value":4334},{"type":606,"tag":636,"props":4926,"children":4927},{"style":751},[4928],{"type":612,"value":1137},{"type":606,"tag":636,"props":4930,"children":4931},{"style":642},[4932],{"type":612,"value":3817},{"type":606,"tag":636,"props":4934,"children":4935},{"style":975},[4936],{"type":612,"value":4222},{"type":606,"tag":636,"props":4938,"children":4939},{"style":642},[4940],{"type":612,"value":3817},{"type":606,"tag":636,"props":4942,"children":4943},{"style":745},[4944],{"type":612,"value":4945}," +",{"type":606,"tag":636,"props":4947,"children":4948},{"style":751},[4949],{"type":612,"value":4950}," summary)\n",{"type":606,"tag":636,"props":4952,"children":4954},{"class":638,"line":4953},300,[4955],{"type":606,"tag":636,"props":4956,"children":4957},{"style":751},[4958],{"type":612,"value":842},{"type":606,"tag":636,"props":4960,"children":4962},{"class":638,"line":4961},301,[4963],{"type":606,"tag":636,"props":4964,"children":4965},{"style":1542},[4966],{"type":612,"value":4967},"    # Remove an item\n",{"type":606,"tag":636,"props":4969,"children":4971},{"class":638,"line":4970},302,[4972,4976,4981,4985],{"type":606,"tag":636,"props":4973,"children":4974},{"style":745},[4975],{"type":612,"value":3219},{"type":606,"tag":636,"props":4977,"children":4978},{"style":751},[4979],{"type":612,"value":4980}," cart.remove_item(",{"type":606,"tag":636,"props":4982,"children":4983},{"style":642},[4984],{"type":612,"value":4532},{"type":606,"tag":636,"props":4986,"children":4987},{"style":751},[4988],{"type":612,"value":1003},{"type":606,"tag":636,"props":4990,"children":4992},{"class":638,"line":4991},303,[4993,4998,5002,5006,5010,5014,5019],{"type":606,"tag":636,"props":4994,"children":4995},{"style":975},[4996],{"type":612,"value":4997},"        print",{"type":606,"tag":636,"props":4999,"children":5000},{"style":751},[5001],{"type":612,"value":1137},{"type":606,"tag":636,"props":5003,"children":5004},{"style":745},[5005],{"type":612,"value":4588},{"type":606,"tag":636,"props":5007,"children":5008},{"style":642},[5009],{"type":612,"value":3817},{"type":606,"tag":636,"props":5011,"children":5012},{"style":975},[5013],{"type":612,"value":4222},{"type":606,"tag":636,"props":5015,"children":5016},{"style":642},[5017],{"type":612,"value":5018},"After removing USB Cable:\"",{"type":606,"tag":636,"props":5020,"children":5021},{"style":751},[5022],{"type":612,"value":1147},{"type":606,"tag":636,"props":5024,"children":5026},{"class":638,"line":5025},304,[5027,5031,5035,5039,5044,5048,5052,5056,5060,5064],{"type":606,"tag":636,"props":5028,"children":5029},{"style":975},[5030],{"type":612,"value":4997},{"type":606,"tag":636,"props":5032,"children":5033},{"style":751},[5034],{"type":612,"value":1137},{"type":606,"tag":636,"props":5036,"children":5037},{"style":745},[5038],{"type":612,"value":4588},{"type":606,"tag":636,"props":5040,"children":5041},{"style":642},[5042],{"type":612,"value":5043},"\"New total: $",{"type":606,"tag":636,"props":5045,"children":5046},{"style":975},[5047],{"type":612,"value":3802},{"type":606,"tag":636,"props":5049,"children":5050},{"style":751},[5051],{"type":612,"value":4175},{"type":606,"tag":636,"props":5053,"children":5054},{"style":745},[5055],{"type":612,"value":4058},{"type":606,"tag":636,"props":5057,"children":5058},{"style":975},[5059],{"type":612,"value":3812},{"type":606,"tag":636,"props":5061,"children":5062},{"style":642},[5063],{"type":612,"value":3817},{"type":606,"tag":636,"props":5065,"children":5066},{"style":751},[5067],{"type":612,"value":1147},{"type":606,"tag":636,"props":5069,"children":5071},{"class":638,"line":5070},305,[5072],{"type":606,"tag":636,"props":5073,"children":5074},{"emptyLinePlaceholder":13},[5075],{"type":612,"value":661},{"type":606,"tag":636,"props":5077,"children":5079},{"class":638,"line":5078},306,[5080],{"type":606,"tag":636,"props":5081,"children":5082},{"emptyLinePlaceholder":13},[5083],{"type":612,"value":661},{"type":606,"tag":636,"props":5085,"children":5087},{"class":638,"line":5086},307,[5088,5093,5098,5103,5108],{"type":606,"tag":636,"props":5089,"children":5090},{"style":745},[5091],{"type":612,"value":5092},"if",{"type":606,"tag":636,"props":5094,"children":5095},{"style":975},[5096],{"type":612,"value":5097}," __name__",{"type":606,"tag":636,"props":5099,"children":5100},{"style":745},[5101],{"type":612,"value":5102}," ==",{"type":606,"tag":636,"props":5104,"children":5105},{"style":642},[5106],{"type":612,"value":5107}," \"__main__\"",{"type":606,"tag":636,"props":5109,"children":5110},{"style":751},[5111],{"type":612,"value":818},{"type":606,"tag":636,"props":5113,"children":5115},{"class":638,"line":5114},308,[5116],{"type":606,"tag":636,"props":5117,"children":5118},{"style":1542},[5119],{"type":612,"value":5120},"    # This block runs only when the script is executed directly,\n",{"type":606,"tag":636,"props":5122,"children":5124},{"class":638,"line":5123},309,[5125],{"type":606,"tag":636,"props":5126,"children":5127},{"style":1542},[5128],{"type":612,"value":5129},"    # not when imported as a module\n",{"type":606,"tag":636,"props":5131,"children":5133},{"class":638,"line":5132},310,[5134],{"type":606,"tag":636,"props":5135,"children":5136},{"style":751},[5137],{"type":612,"value":5138},"    demonstrate_shopping_cart()\n",{"type":606,"tag":5140,"props":5141,"children":5143},"h2",{"id":5142},"understanding-documentation",[5144],{"type":612,"value":5145},"🎯 Understanding Documentation",{"type":606,"tag":615,"props":5147,"children":5148},{},[5149],{"type":612,"value":5150},"Good documentation serves different audiences and purposes in your codebase.",{"type":606,"tag":5152,"props":5153,"children":5157},"info-box",{"emoji":5154,"title":5155,"type":5156},"📖","Documentation Types","info",[5158,5167,5187,5195,5218,5226,5244,5252,5270],{"type":606,"tag":615,"props":5159,"children":5160},{},[5161],{"type":606,"tag":5162,"props":5163,"children":5164},"strong",{},[5165],{"type":612,"value":5166},"Module Documentation:",{"type":606,"tag":5168,"props":5169,"children":5170},"ul",{},[5171,5177,5182],{"type":606,"tag":5172,"props":5173,"children":5174},"li",{},[5175],{"type":612,"value":5176},"Overview of what the module does",{"type":606,"tag":5172,"props":5178,"children":5179},{},[5180],{"type":612,"value":5181},"Usage examples and common patterns",{"type":606,"tag":5172,"props":5183,"children":5184},{},[5185],{"type":612,"value":5186},"Dependencies and requirements",{"type":606,"tag":615,"props":5188,"children":5189},{},[5190],{"type":606,"tag":5162,"props":5191,"children":5192},{},[5193],{"type":612,"value":5194},"Function Documentation:",{"type":606,"tag":5168,"props":5196,"children":5197},{},[5198,5203,5208,5213],{"type":606,"tag":5172,"props":5199,"children":5200},{},[5201],{"type":612,"value":5202},"Purpose and behavior",{"type":606,"tag":5172,"props":5204,"children":5205},{},[5206],{"type":612,"value":5207},"Parameters and return values",{"type":606,"tag":5172,"props":5209,"children":5210},{},[5211],{"type":612,"value":5212},"Error conditions and exceptions",{"type":606,"tag":5172,"props":5214,"children":5215},{},[5216],{"type":612,"value":5217},"Usage examples",{"type":606,"tag":615,"props":5219,"children":5220},{},[5221],{"type":606,"tag":5162,"props":5222,"children":5223},{},[5224],{"type":612,"value":5225},"Class Documentation:",{"type":606,"tag":5168,"props":5227,"children":5228},{},[5229,5234,5239],{"type":606,"tag":5172,"props":5230,"children":5231},{},[5232],{"type":612,"value":5233},"What the class represents",{"type":606,"tag":5172,"props":5235,"children":5236},{},[5237],{"type":612,"value":5238},"Key attributes and methods",{"type":606,"tag":5172,"props":5240,"children":5241},{},[5242],{"type":612,"value":5243},"Usage patterns and examples",{"type":606,"tag":615,"props":5245,"children":5246},{},[5247],{"type":606,"tag":5162,"props":5248,"children":5249},{},[5250],{"type":612,"value":5251},"Inline Comments:",{"type":606,"tag":5168,"props":5253,"children":5254},{},[5255,5260,5265],{"type":606,"tag":5172,"props":5256,"children":5257},{},[5258],{"type":612,"value":5259},"Explain complex logic",{"type":606,"tag":5172,"props":5261,"children":5262},{},[5263],{"type":612,"value":5264},"Clarify business rules",{"type":606,"tag":5172,"props":5266,"children":5267},{},[5268],{"type":612,"value":5269},"Document workarounds or temporary solutions",{"type":606,"tag":615,"props":5271,"children":5272},{},[5273,5278],{"type":606,"tag":5162,"props":5274,"children":5275},{},[5276],{"type":612,"value":5277},"Remember:",{"type":612,"value":5279}," Write for humans, not just computers!",{"type":606,"tag":5281,"props":5282,"children":5284},"h3",{"id":5283},"docstring-conventions",[5285],{"type":612,"value":5286},"Docstring Conventions",{"type":606,"tag":621,"props":5288,"children":5289},{},[5290],{"type":606,"tag":625,"props":5291,"children":5293},{"className":627,"code":5292,"language":629,"meta":8,"style":8},"\"\"\"\nutilities.py - Common utility functions\n\nThis module provides helpful utility functions for data processing,\nvalidation, and formatting that are used across the application.\n\"\"\"\n\nfrom typing import List, Union, Optional\nimport re\n\n\ndef validate_email(email: str) -> bool:\n    \"\"\"\n    Validate an email address format.\n    \n    Checks if the email follows basic email format rules including\n    having an @ symbol and a domain with at least one dot.\n    \n    Args:\n        email (str): The email address to validate\n        \n    Returns:\n        bool: True if email format is valid, False otherwise\n        \n    Example:\n        >>> validate_email(\"user@example.com\")\n        True\n        >>> validate_email(\"invalid-email\")\n        False\n        \n    Note:\n        This is a basic validation. For production use, consider\n        more robust email validation libraries.\n    \"\"\"\n    if not email or not isinstance(email, str):\n        return False\n    \n    # Basic email pattern check\n    pattern = r'^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$'\n    return bool(re.match(pattern, email))\n\n\ndef format_currency(amount: float, currency: str = \"USD\") -> str:\n    \"\"\"\n    Format a monetary amount as a currency string.\n    \n    Args:\n        amount (float): The monetary amount to format\n        currency (str, optional): Currency code. Defaults to \"USD\".\n        \n    Returns:\n        str: Formatted currency string\n        \n    Raises:\n        ValueError: If amount is negative or currency code is invalid\n        \n    Examples:\n        >>> format_currency(19.99)\n        '$19.99'\n        >>> format_currency(1000.5, \"EUR\")\n        '€1,000.50'\n        >>> format_currency(0)\n        '$0.00'\n    \"\"\"\n    if amount \u003C 0:\n        raise ValueError(\"Amount cannot be negative\")\n    \n    # Currency symbols mapping\n    symbols = {\n        \"USD\": \"$\",\n        \"EUR\": \"€\", \n        \"GBP\": \"£\",\n        \"JPY\": \"¥\"\n    }\n    \n    if currency not in symbols:\n        raise ValueError(f\"Unsupported currency: {currency}\")\n    \n    symbol = symbols[currency]\n    \n    # Format with thousands separator and 2 decimal places\n    if amount >= 1000:\n        return f\"{symbol}{amount:,.2f}\"\n    else:\n        return f\"{symbol}{amount:.2f}\"\n\n\ndef chunk_list(items: List, chunk_size: int) -> List[List]:\n    \"\"\"\n    Split a list into smaller chunks of specified size.\n    \n    This is useful for processing large lists in smaller batches,\n    such as when making API calls or database operations.\n    \n    Args:\n        items (List): The list to split into chunks\n        chunk_size (int): Maximum size of each chunk\n        \n    Returns:\n        List[List]: List of chunks, where each chunk is a list\n        \n    Raises:\n        ValueError: If chunk_size is not positive\n        \n    Examples:\n        >>> chunk_list([1, 2, 3, 4, 5], 2)\n        [[1, 2], [3, 4], [5]]\n        >>> chunk_list([], 3)\n        []\n        >>> chunk_list([1, 2, 3], 5)\n        [[1, 2, 3]]\n        \n    Note:\n        The last chunk may contain fewer items than chunk_size\n        if the total number of items is not evenly divisible.\n    \"\"\"\n    if chunk_size \u003C= 0:\n        raise ValueError(\"Chunk size must be positive\")\n    \n    if not items:\n        return []\n    \n    chunks = []\n    for i in range(0, len(items), chunk_size):\n        chunk = items[i:i + chunk_size]\n        chunks.append(chunk)\n    \n    return chunks\n\n\nclass DataProcessor:\n    \"\"\"\n    A utility class for processing and transforming data.\n    \n    This class provides methods for common data processing tasks\n    like filtering, transforming, and aggregating data sets.\n    \n    Attributes:\n        data (List): The current dataset being processed\n        processed_count (int): Number of items processed\n        \n    Example:\n        >>> processor = DataProcessor([1, 2, 3, 4, 5])\n        >>> processor.filter_even()\n        >>> processor.get_data()\n        [2, 4]\n    \"\"\"\n    \n    def __init__(self, data: List = None):\n        \"\"\"\n        Initialize the data processor.\n        \n        Args:\n            data (List, optional): Initial data to process. Defaults to empty list.\n        \"\"\"\n        self.data = data if data is not None else []\n        self.processed_count = 0\n    \n    def filter_even(self) -> 'DataProcessor':\n        \"\"\"\n        Filter the data to keep only even numbers.\n        \n        Returns:\n            DataProcessor: Self, for method chaining\n            \n        Raises:\n            TypeError: If data contains non-numeric values\n            \n        Example:\n            >>> processor = DataProcessor([1, 2, 3, 4, 5, 6])\n            >>> processor.filter_even().get_data()\n            [2, 4, 6]\n        \"\"\"\n        try:\n            self.data = [x for x in self.data if isinstance(x, (int, float)) and x % 2 == 0]\n            self.processed_count += 1\n            return self\n        except TypeError as e:\n            raise TypeError(\"Data must contain only numeric values\") from e\n    \n    def multiply_by(self, factor: Union[int, float]) -> 'DataProcessor':\n        \"\"\"\n        Multiply all values in the data by a factor.\n        \n        Args:\n            factor (Union[int, float]): Number to multiply each value by\n            \n        Returns:\n            DataProcessor: Self, for method chaining\n            \n        Example:\n            >>> processor = DataProcessor([1, 2, 3])\n            >>> processor.multiply_by(2).get_data()\n            [2, 4, 6]\n        \"\"\"\n        self.data = [x * factor for x in self.data]\n        self.processed_count += 1\n        return self\n    \n    def get_data(self) -> List:\n        \"\"\"\n        Get the current processed data.\n        \n        Returns:\n            List: A copy of the current data\n            \n        Note:\n            Returns a copy to prevent external modification\n            of the internal data structure.\n        \"\"\"\n        return self.data.copy()\n    \n    def get_stats(self) -> dict:\n        \"\"\"\n        Get basic statistics about the current data.\n        \n        Returns:\n            dict: Statistics including count, sum, min, max, and average\n            \n        Example:\n            >>> processor = DataProcessor([1, 2, 3, 4, 5])\n            >>> stats = processor.get_stats()\n            >>> stats['average']\n            3.0\n        \"\"\"\n        if not self.data:\n            return {\n                'count': 0,\n                'sum': 0,\n                'min': None,\n                'max': None,\n                'average': None\n            }\n        \n        return {\n            'count': len(self.data),\n            'sum': sum(self.data),\n            'min': min(self.data),\n            'max': max(self.data),\n            'average': sum(self.data) / len(self.data)\n        }\n\n\ndef demonstrate_utilities():\n    \"\"\"\n    Demonstrate the utility functions and classes.\n    \n    This function shows practical examples of how to use\n    the utilities provided in this module.\n    \"\"\"\n    print(\"Utility Functions Demo\")\n    print(\"=\" * 30)\n    \n    # Email validation examples\n    emails = [\"user@example.com\", \"invalid-email\", \"test@domain.co.uk\"]\n    print(\"Email Validation:\")\n    for email in emails:\n        is_valid = validate_email(email)\n        status = \"✓ Valid\" if is_valid else \"✗ Invalid\"\n        print(f\"  {email}: {status}\")\n    \n    # Currency formatting examples\n    amounts = [19.99, 1000.50, 0, 1234567.89]\n    print(\"\\nCurrency Formatting:\")\n    for amount in amounts:\n        formatted = format_currency(amount)\n        print(f\"  ${amount} → {formatted}\")\n    \n    # List chunking example\n    numbers = list(range(1, 11))  # [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n    chunks = chunk_list(numbers, 3)\n    print(f\"\\nChunking {numbers} into groups of 3:\")\n    for i, chunk in enumerate(chunks):\n        print(f\"  Chunk {i+1}: {chunk}\")\n    \n    # Data processor example\n    print(\"\\nData Processing:\")\n    processor = DataProcessor([1, 2, 3, 4, 5, 6, 7, 8, 9, 10])\n    \n    # Chain operations\n    result = processor.filter_even().multiply_by(2).get_data()\n    stats = processor.get_stats()\n    \n    print(f\"  Original: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\")\n    print(f\"  After filter_even().multiply_by(2): {result}\")\n    print(f\"  Stats: {stats}\")\n\n\nif __name__ == \"__main__\":\n    demonstrate_utilities()\n",[5294],{"type":606,"tag":632,"props":5295,"children":5296},{"__ignoreMap":8},[5297,5304,5312,5319,5327,5335,5342,5349,5369,5381,5388,5395,5428,5435,5443,5450,5458,5466,5473,5480,5488,5495,5502,5510,5517,5524,5536,5544,5556,5564,5571,5578,5586,5594,5601,5645,5656,5663,5671,5743,5760,5767,5774,5825,5832,5840,5847,5854,5862,5870,5877,5884,5892,5899,5906,5914,5921,5929,5941,5949,5961,5969,5981,5989,5996,6020,6044,6051,6059,6075,6097,6119,6140,6157,6165,6172,6199,6244,6251,6268,6275,6283,6308,6355,6367,6410,6417,6424,6450,6457,6465,6472,6480,6488,6495,6502,6510,6518,6525,6532,6540,6547,6554,6562,6569,6576,6588,6596,6608,6616,6628,6636,6643,6650,6658,6666,6673,6697,6721,6728,6744,6755,6762,6778,6821,6847,6855,6862,6874,6881,6888,6904,6911,6919,6926,6934,6942,6949,6956,6964,6972,6979,6986,6998,7010,7022,7030,7037,7044,7073,7080,7088,7095,7102,7110,7117,7168,7188,7195,7220,7227,7235,7242,7249,7257,7264,7271,7279,7286,7293,7305,7317,7325,7332,7344,7446,7466,7479,7502,7536,7543,7585,7592,7600,7607,7614,7622,7629,7636,7643,7650,7657,7669,7681,7688,7695,7744,7763,7774,7781,7798,7805,7813,7820,7827,7835,7842,7849,7857,7865,7872,7888,7895,7920,7927,7935,7942,7949,7957,7964,7971,7982,7994,8006,8014,8021,8041,8052,8072,8092,8112,8132,8149,8157,8164,8175,8204,8233,8262,8291,8342,8349,8356,8363,8379,8386,8394,8401,8409,8417,8424,8444,8472,8479,8487,8531,8551,8571,8588,8625,8683,8690,8698,8749,8777,8797,8814,8872,8879,8887,8940,8964,9014,9039,9102,9109,9117,9145,9250,9257,9265,9291,9308,9315,9339,9380,9421,9428,9435,9458],{"type":606,"tag":636,"props":5298,"children":5299},{"class":638,"line":12},[5300],{"type":606,"tag":636,"props":5301,"children":5302},{"style":642},[5303],{"type":612,"value":645},{"type":606,"tag":636,"props":5305,"children":5306},{"class":638,"line":27},[5307],{"type":606,"tag":636,"props":5308,"children":5309},{"style":642},[5310],{"type":612,"value":5311},"utilities.py - Common utility functions\n",{"type":606,"tag":636,"props":5313,"children":5314},{"class":638,"line":36},[5315],{"type":606,"tag":636,"props":5316,"children":5317},{"emptyLinePlaceholder":13},[5318],{"type":612,"value":661},{"type":606,"tag":636,"props":5320,"children":5321},{"class":638,"line":45},[5322],{"type":606,"tag":636,"props":5323,"children":5324},{"style":642},[5325],{"type":612,"value":5326},"This module provides helpful utility functions for data processing,\n",{"type":606,"tag":636,"props":5328,"children":5329},{"class":638,"line":54},[5330],{"type":606,"tag":636,"props":5331,"children":5332},{"style":642},[5333],{"type":612,"value":5334},"validation, and formatting that are used across the application.\n",{"type":606,"tag":636,"props":5336,"children":5337},{"class":638,"line":63},[5338],{"type":606,"tag":636,"props":5339,"children":5340},{"style":642},[5341],{"type":612,"value":645},{"type":606,"tag":636,"props":5343,"children":5344},{"class":638,"line":72},[5345],{"type":606,"tag":636,"props":5346,"children":5347},{"emptyLinePlaceholder":13},[5348],{"type":612,"value":661},{"type":606,"tag":636,"props":5350,"children":5351},{"class":638,"line":81},[5352,5356,5360,5364],{"type":606,"tag":636,"props":5353,"children":5354},{"style":745},[5355],{"type":612,"value":748},{"type":606,"tag":636,"props":5357,"children":5358},{"style":751},[5359],{"type":612,"value":754},{"type":606,"tag":636,"props":5361,"children":5362},{"style":745},[5363],{"type":612,"value":759},{"type":606,"tag":636,"props":5365,"children":5366},{"style":751},[5367],{"type":612,"value":5368}," List, Union, Optional\n",{"type":606,"tag":636,"props":5370,"children":5371},{"class":638,"line":703},[5372,5376],{"type":606,"tag":636,"props":5373,"children":5374},{"style":745},[5375],{"type":612,"value":759},{"type":606,"tag":636,"props":5377,"children":5378},{"style":751},[5379],{"type":612,"value":5380}," re\n",{"type":606,"tag":636,"props":5382,"children":5383},{"class":638,"line":99},[5384],{"type":606,"tag":636,"props":5385,"children":5386},{"emptyLinePlaceholder":13},[5387],{"type":612,"value":661},{"type":606,"tag":636,"props":5389,"children":5390},{"class":638,"line":108},[5391],{"type":606,"tag":636,"props":5392,"children":5393},{"emptyLinePlaceholder":13},[5394],{"type":612,"value":661},{"type":606,"tag":636,"props":5396,"children":5397},{"class":638,"line":117},[5398,5402,5407,5412,5416,5420,5424],{"type":606,"tag":636,"props":5399,"children":5400},{"style":745},[5401],{"type":612,"value":2951},{"type":606,"tag":636,"props":5403,"children":5404},{"style":810},[5405],{"type":612,"value":5406}," validate_email",{"type":606,"tag":636,"props":5408,"children":5409},{"style":751},[5410],{"type":612,"value":5411},"(email: ",{"type":606,"tag":636,"props":5413,"children":5414},{"style":975},[5415],{"type":612,"value":1248},{"type":606,"tag":636,"props":5417,"children":5418},{"style":751},[5419],{"type":612,"value":1281},{"type":606,"tag":636,"props":5421,"children":5422},{"style":975},[5423],{"type":612,"value":1823},{"type":606,"tag":636,"props":5425,"children":5426},{"style":751},[5427],{"type":612,"value":818},{"type":606,"tag":636,"props":5429,"children":5430},{"class":638,"line":126},[5431],{"type":606,"tag":636,"props":5432,"children":5433},{"style":642},[5434],{"type":612,"value":826},{"type":606,"tag":636,"props":5436,"children":5437},{"class":638,"line":135},[5438],{"type":606,"tag":636,"props":5439,"children":5440},{"style":642},[5441],{"type":612,"value":5442},"    Validate an email address format.\n",{"type":606,"tag":636,"props":5444,"children":5445},{"class":638,"line":144},[5446],{"type":606,"tag":636,"props":5447,"children":5448},{"style":642},[5449],{"type":612,"value":842},{"type":606,"tag":636,"props":5451,"children":5452},{"class":638,"line":153},[5453],{"type":606,"tag":636,"props":5454,"children":5455},{"style":642},[5456],{"type":612,"value":5457},"    Checks if the email follows basic email format rules including\n",{"type":606,"tag":636,"props":5459,"children":5460},{"class":638,"line":163},[5461],{"type":606,"tag":636,"props":5462,"children":5463},{"style":642},[5464],{"type":612,"value":5465},"    having an @ symbol and a domain with at least one dot.\n",{"type":606,"tag":636,"props":5467,"children":5468},{"class":638,"line":172},[5469],{"type":606,"tag":636,"props":5470,"children":5471},{"style":642},[5472],{"type":612,"value":842},{"type":606,"tag":636,"props":5474,"children":5475},{"class":638,"line":181},[5476],{"type":606,"tag":636,"props":5477,"children":5478},{"style":642},[5479],{"type":612,"value":3046},{"type":606,"tag":636,"props":5481,"children":5482},{"class":638,"line":190},[5483],{"type":606,"tag":636,"props":5484,"children":5485},{"style":642},[5486],{"type":612,"value":5487},"        email (str): The email address to validate\n",{"type":606,"tag":636,"props":5489,"children":5490},{"class":638,"line":199},[5491],{"type":606,"tag":636,"props":5492,"children":5493},{"style":642},[5494],{"type":612,"value":897},{"type":606,"tag":636,"props":5496,"children":5497},{"class":638,"line":208},[5498],{"type":606,"tag":636,"props":5499,"children":5500},{"style":642},[5501],{"type":612,"value":3081},{"type":606,"tag":636,"props":5503,"children":5504},{"class":638,"line":217},[5505],{"type":606,"tag":636,"props":5506,"children":5507},{"style":642},[5508],{"type":612,"value":5509},"        bool: True if email format is valid, False otherwise\n",{"type":606,"tag":636,"props":5511,"children":5512},{"class":638,"line":227},[5513],{"type":606,"tag":636,"props":5514,"children":5515},{"style":642},[5516],{"type":612,"value":897},{"type":606,"tag":636,"props":5518,"children":5519},{"class":638,"line":236},[5520],{"type":606,"tag":636,"props":5521,"children":5522},{"style":642},[5523],{"type":612,"value":905},{"type":606,"tag":636,"props":5525,"children":5526},{"class":638,"line":245},[5527,5531],{"type":606,"tag":636,"props":5528,"children":5529},{"style":745},[5530],{"type":612,"value":913},{"type":606,"tag":636,"props":5532,"children":5533},{"style":642},[5534],{"type":612,"value":5535},"validate_email(\"user@example.com\")\n",{"type":606,"tag":636,"props":5537,"children":5538},{"class":638,"line":254},[5539],{"type":606,"tag":636,"props":5540,"children":5541},{"style":642},[5542],{"type":612,"value":5543},"        True\n",{"type":606,"tag":636,"props":5545,"children":5546},{"class":638,"line":263},[5547,5551],{"type":606,"tag":636,"props":5548,"children":5549},{"style":745},[5550],{"type":612,"value":913},{"type":606,"tag":636,"props":5552,"children":5553},{"style":642},[5554],{"type":612,"value":5555},"validate_email(\"invalid-email\")\n",{"type":606,"tag":636,"props":5557,"children":5558},{"class":638,"line":272},[5559],{"type":606,"tag":636,"props":5560,"children":5561},{"style":642},[5562],{"type":612,"value":5563},"        False\n",{"type":606,"tag":636,"props":5565,"children":5566},{"class":638,"line":281},[5567],{"type":606,"tag":636,"props":5568,"children":5569},{"style":642},[5570],{"type":612,"value":897},{"type":606,"tag":636,"props":5572,"children":5573},{"class":638,"line":291},[5574],{"type":606,"tag":636,"props":5575,"children":5576},{"style":642},[5577],{"type":612,"value":3133},{"type":606,"tag":636,"props":5579,"children":5580},{"class":638,"line":302},[5581],{"type":606,"tag":636,"props":5582,"children":5583},{"style":642},[5584],{"type":612,"value":5585},"        This is a basic validation. For production use, consider\n",{"type":606,"tag":636,"props":5587,"children":5588},{"class":638,"line":311},[5589],{"type":606,"tag":636,"props":5590,"children":5591},{"style":642},[5592],{"type":612,"value":5593},"        more robust email validation libraries.\n",{"type":606,"tag":636,"props":5595,"children":5596},{"class":638,"line":320},[5597],{"type":606,"tag":636,"props":5598,"children":5599},{"style":642},[5600],{"type":612,"value":826},{"type":606,"tag":636,"props":5602,"children":5603},{"class":638,"line":329},[5604,5608,5613,5618,5623,5627,5632,5637,5641],{"type":606,"tag":636,"props":5605,"children":5606},{"style":745},[5607],{"type":612,"value":3219},{"type":606,"tag":636,"props":5609,"children":5610},{"style":745},[5611],{"type":612,"value":5612}," not",{"type":606,"tag":636,"props":5614,"children":5615},{"style":751},[5616],{"type":612,"value":5617}," email ",{"type":606,"tag":636,"props":5619,"children":5620},{"style":745},[5621],{"type":612,"value":5622},"or",{"type":606,"tag":636,"props":5624,"children":5625},{"style":745},[5626],{"type":612,"value":5612},{"type":606,"tag":636,"props":5628,"children":5629},{"style":975},[5630],{"type":612,"value":5631}," isinstance",{"type":606,"tag":636,"props":5633,"children":5634},{"style":751},[5635],{"type":612,"value":5636},"(email, ",{"type":606,"tag":636,"props":5638,"children":5639},{"style":975},[5640],{"type":612,"value":1248},{"type":606,"tag":636,"props":5642,"children":5643},{"style":751},[5644],{"type":612,"value":1003},{"type":606,"tag":636,"props":5646,"children":5647},{"class":638,"line":338},[5648,5652],{"type":606,"tag":636,"props":5649,"children":5650},{"style":745},[5651],{"type":612,"value":2082},{"type":606,"tag":636,"props":5653,"children":5654},{"style":975},[5655],{"type":612,"value":2087},{"type":606,"tag":636,"props":5657,"children":5658},{"class":638,"line":347},[5659],{"type":606,"tag":636,"props":5660,"children":5661},{"style":751},[5662],{"type":612,"value":842},{"type":606,"tag":636,"props":5664,"children":5665},{"class":638,"line":356},[5666],{"type":606,"tag":636,"props":5667,"children":5668},{"style":1542},[5669],{"type":612,"value":5670},"    # Basic email pattern check\n",{"type":606,"tag":636,"props":5672,"children":5673},{"class":638,"line":367},[5674,5679,5683,5688,5693,5698,5702,5708,5713,5717,5723,5728,5733,5738],{"type":606,"tag":636,"props":5675,"children":5676},{"style":751},[5677],{"type":612,"value":5678},"    pattern ",{"type":606,"tag":636,"props":5680,"children":5681},{"style":745},[5682],{"type":612,"value":1172},{"type":606,"tag":636,"props":5684,"children":5685},{"style":745},[5686],{"type":612,"value":5687}," r",{"type":606,"tag":636,"props":5689,"children":5690},{"style":642},[5691],{"type":612,"value":5692},"'",{"type":606,"tag":636,"props":5694,"children":5695},{"style":975},[5696],{"type":612,"value":5697},"^[a-zA-Z0-9._%+-]",{"type":606,"tag":636,"props":5699,"children":5700},{"style":745},[5701],{"type":612,"value":3462},{"type":606,"tag":636,"props":5703,"children":5705},{"style":5704},"--shiki-default:#032F62;--shiki-app-dark-mode:#DBEDFF",[5706],{"type":612,"value":5707},"@",{"type":606,"tag":636,"props":5709,"children":5710},{"style":975},[5711],{"type":612,"value":5712},"[a-zA-Z0-9.-]",{"type":606,"tag":636,"props":5714,"children":5715},{"style":745},[5716],{"type":612,"value":3462},{"type":606,"tag":636,"props":5718,"children":5720},{"style":5719},"--shiki-default:#22863A;--shiki-default-font-weight:bold;--shiki-app-dark-mode:#85E89D;--shiki-app-dark-mode-font-weight:bold",[5721],{"type":612,"value":5722},"\\.",{"type":606,"tag":636,"props":5724,"children":5725},{"style":975},[5726],{"type":612,"value":5727},"[a-zA-Z]",{"type":606,"tag":636,"props":5729,"children":5730},{"style":745},[5731],{"type":612,"value":5732},"{2,}",{"type":606,"tag":636,"props":5734,"children":5735},{"style":975},[5736],{"type":612,"value":5737},"$",{"type":606,"tag":636,"props":5739,"children":5740},{"style":642},[5741],{"type":612,"value":5742},"'\n",{"type":606,"tag":636,"props":5744,"children":5745},{"class":638,"line":376},[5746,5750,5755],{"type":606,"tag":636,"props":5747,"children":5748},{"style":745},[5749],{"type":612,"value":3485},{"type":606,"tag":636,"props":5751,"children":5752},{"style":975},[5753],{"type":612,"value":5754}," bool",{"type":606,"tag":636,"props":5756,"children":5757},{"style":751},[5758],{"type":612,"value":5759},"(re.match(pattern, email))\n",{"type":606,"tag":636,"props":5761,"children":5762},{"class":638,"line":385},[5763],{"type":606,"tag":636,"props":5764,"children":5765},{"emptyLinePlaceholder":13},[5766],{"type":612,"value":661},{"type":606,"tag":636,"props":5768,"children":5769},{"class":638,"line":394},[5770],{"type":606,"tag":636,"props":5771,"children":5772},{"emptyLinePlaceholder":13},[5773],{"type":612,"value":661},{"type":606,"tag":636,"props":5775,"children":5776},{"class":638,"line":403},[5777,5781,5786,5791,5795,5800,5804,5808,5813,5817,5821],{"type":606,"tag":636,"props":5778,"children":5779},{"style":745},[5780],{"type":612,"value":2951},{"type":606,"tag":636,"props":5782,"children":5783},{"style":810},[5784],{"type":612,"value":5785}," format_currency",{"type":606,"tag":636,"props":5787,"children":5788},{"style":751},[5789],{"type":612,"value":5790},"(amount: ",{"type":606,"tag":636,"props":5792,"children":5793},{"style":975},[5794],{"type":612,"value":988},{"type":606,"tag":636,"props":5796,"children":5797},{"style":751},[5798],{"type":612,"value":5799},", currency: ",{"type":606,"tag":636,"props":5801,"children":5802},{"style":975},[5803],{"type":612,"value":1248},{"type":606,"tag":636,"props":5805,"children":5806},{"style":745},[5807],{"type":612,"value":993},{"type":606,"tag":636,"props":5809,"children":5810},{"style":642},[5811],{"type":612,"value":5812}," \"USD\"",{"type":606,"tag":636,"props":5814,"children":5815},{"style":751},[5816],{"type":612,"value":1281},{"type":606,"tag":636,"props":5818,"children":5819},{"style":975},[5820],{"type":612,"value":1248},{"type":606,"tag":636,"props":5822,"children":5823},{"style":751},[5824],{"type":612,"value":818},{"type":606,"tag":636,"props":5826,"children":5827},{"class":638,"line":412},[5828],{"type":606,"tag":636,"props":5829,"children":5830},{"style":642},[5831],{"type":612,"value":826},{"type":606,"tag":636,"props":5833,"children":5834},{"class":638,"line":423},[5835],{"type":606,"tag":636,"props":5836,"children":5837},{"style":642},[5838],{"type":612,"value":5839},"    Format a monetary amount as a currency string.\n",{"type":606,"tag":636,"props":5841,"children":5842},{"class":638,"line":432},[5843],{"type":606,"tag":636,"props":5844,"children":5845},{"style":642},[5846],{"type":612,"value":842},{"type":606,"tag":636,"props":5848,"children":5849},{"class":638,"line":441},[5850],{"type":606,"tag":636,"props":5851,"children":5852},{"style":642},[5853],{"type":612,"value":3046},{"type":606,"tag":636,"props":5855,"children":5856},{"class":638,"line":450},[5857],{"type":606,"tag":636,"props":5858,"children":5859},{"style":642},[5860],{"type":612,"value":5861},"        amount (float): The monetary amount to format\n",{"type":606,"tag":636,"props":5863,"children":5864},{"class":638,"line":459},[5865],{"type":606,"tag":636,"props":5866,"children":5867},{"style":642},[5868],{"type":612,"value":5869},"        currency (str, optional): Currency code. Defaults to \"USD\".\n",{"type":606,"tag":636,"props":5871,"children":5872},{"class":638,"line":468},[5873],{"type":606,"tag":636,"props":5874,"children":5875},{"style":642},[5876],{"type":612,"value":897},{"type":606,"tag":636,"props":5878,"children":5879},{"class":638,"line":477},[5880],{"type":606,"tag":636,"props":5881,"children":5882},{"style":642},[5883],{"type":612,"value":3081},{"type":606,"tag":636,"props":5885,"children":5886},{"class":638,"line":488},[5887],{"type":606,"tag":636,"props":5888,"children":5889},{"style":642},[5890],{"type":612,"value":5891},"        str: Formatted currency string\n",{"type":606,"tag":636,"props":5893,"children":5894},{"class":638,"line":497},[5895],{"type":606,"tag":636,"props":5896,"children":5897},{"style":642},[5898],{"type":612,"value":897},{"type":606,"tag":636,"props":5900,"children":5901},{"class":638,"line":506},[5902],{"type":606,"tag":636,"props":5903,"children":5904},{"style":642},[5905],{"type":612,"value":3107},{"type":606,"tag":636,"props":5907,"children":5908},{"class":638,"line":515},[5909],{"type":606,"tag":636,"props":5910,"children":5911},{"style":642},[5912],{"type":612,"value":5913},"        ValueError: If amount is negative or currency code is invalid\n",{"type":606,"tag":636,"props":5915,"children":5916},{"class":638,"line":524},[5917],{"type":606,"tag":636,"props":5918,"children":5919},{"style":642},[5920],{"type":612,"value":897},{"type":606,"tag":636,"props":5922,"children":5923},{"class":638,"line":533},[5924],{"type":606,"tag":636,"props":5925,"children":5926},{"style":642},[5927],{"type":612,"value":5928},"    Examples:\n",{"type":606,"tag":636,"props":5930,"children":5931},{"class":638,"line":544},[5932,5936],{"type":606,"tag":636,"props":5933,"children":5934},{"style":745},[5935],{"type":612,"value":913},{"type":606,"tag":636,"props":5937,"children":5938},{"style":642},[5939],{"type":612,"value":5940},"format_currency(19.99)\n",{"type":606,"tag":636,"props":5942,"children":5943},{"class":638,"line":553},[5944],{"type":606,"tag":636,"props":5945,"children":5946},{"style":642},[5947],{"type":612,"value":5948},"        '$19.99'\n",{"type":606,"tag":636,"props":5950,"children":5951},{"class":638,"line":562},[5952,5956],{"type":606,"tag":636,"props":5953,"children":5954},{"style":745},[5955],{"type":612,"value":913},{"type":606,"tag":636,"props":5957,"children":5958},{"style":642},[5959],{"type":612,"value":5960},"format_currency(1000.5, \"EUR\")\n",{"type":606,"tag":636,"props":5962,"children":5963},{"class":638,"line":571},[5964],{"type":606,"tag":636,"props":5965,"children":5966},{"style":642},[5967],{"type":612,"value":5968},"        '€1,000.50'\n",{"type":606,"tag":636,"props":5970,"children":5971},{"class":638,"line":580},[5972,5976],{"type":606,"tag":636,"props":5973,"children":5974},{"style":745},[5975],{"type":612,"value":913},{"type":606,"tag":636,"props":5977,"children":5978},{"style":642},[5979],{"type":612,"value":5980},"format_currency(0)\n",{"type":606,"tag":636,"props":5982,"children":5983},{"class":638,"line":589},[5984],{"type":606,"tag":636,"props":5985,"children":5986},{"style":642},[5987],{"type":612,"value":5988},"        '$0.00'\n",{"type":606,"tag":636,"props":5990,"children":5991},{"class":638,"line":1368},[5992],{"type":606,"tag":636,"props":5993,"children":5994},{"style":642},[5995],{"type":612,"value":826},{"type":606,"tag":636,"props":5997,"children":5998},{"class":638,"line":1376},[5999,6003,6008,6012,6016],{"type":606,"tag":636,"props":6000,"children":6001},{"style":745},[6002],{"type":612,"value":3219},{"type":606,"tag":636,"props":6004,"children":6005},{"style":751},[6006],{"type":612,"value":6007}," amount ",{"type":606,"tag":636,"props":6009,"children":6010},{"style":745},[6011],{"type":612,"value":1091},{"type":606,"tag":636,"props":6013,"children":6014},{"style":975},[6015],{"type":612,"value":1096},{"type":606,"tag":636,"props":6017,"children":6018},{"style":751},[6019],{"type":612,"value":818},{"type":606,"tag":636,"props":6021,"children":6022},{"class":638,"line":1385},[6023,6027,6031,6035,6040],{"type":606,"tag":636,"props":6024,"children":6025},{"style":745},[6026],{"type":612,"value":3262},{"type":606,"tag":636,"props":6028,"children":6029},{"style":975},[6030],{"type":612,"value":1132},{"type":606,"tag":636,"props":6032,"children":6033},{"style":751},[6034],{"type":612,"value":1137},{"type":606,"tag":636,"props":6036,"children":6037},{"style":642},[6038],{"type":612,"value":6039},"\"Amount cannot be negative\"",{"type":606,"tag":636,"props":6041,"children":6042},{"style":751},[6043],{"type":612,"value":1147},{"type":606,"tag":636,"props":6045,"children":6046},{"class":638,"line":1399},[6047],{"type":606,"tag":636,"props":6048,"children":6049},{"style":751},[6050],{"type":612,"value":842},{"type":606,"tag":636,"props":6052,"children":6053},{"class":638,"line":1412},[6054],{"type":606,"tag":636,"props":6055,"children":6056},{"style":1542},[6057],{"type":612,"value":6058},"    # Currency symbols mapping\n",{"type":606,"tag":636,"props":6060,"children":6061},{"class":638,"line":1421},[6062,6067,6071],{"type":606,"tag":636,"props":6063,"children":6064},{"style":751},[6065],{"type":612,"value":6066},"    symbols ",{"type":606,"tag":636,"props":6068,"children":6069},{"style":745},[6070],{"type":612,"value":1172},{"type":606,"tag":636,"props":6072,"children":6073},{"style":751},[6074],{"type":612,"value":1707},{"type":606,"tag":636,"props":6076,"children":6077},{"class":638,"line":1429},[6078,6083,6088,6093],{"type":606,"tag":636,"props":6079,"children":6080},{"style":642},[6081],{"type":612,"value":6082},"        \"USD\"",{"type":606,"tag":636,"props":6084,"children":6085},{"style":751},[6086],{"type":612,"value":6087},": ",{"type":606,"tag":636,"props":6089,"children":6090},{"style":642},[6091],{"type":612,"value":6092},"\"$\"",{"type":606,"tag":636,"props":6094,"children":6095},{"style":751},[6096],{"type":612,"value":3822},{"type":606,"tag":636,"props":6098,"children":6099},{"class":638,"line":1454},[6100,6105,6109,6114],{"type":606,"tag":636,"props":6101,"children":6102},{"style":642},[6103],{"type":612,"value":6104},"        \"EUR\"",{"type":606,"tag":636,"props":6106,"children":6107},{"style":751},[6108],{"type":612,"value":6087},{"type":606,"tag":636,"props":6110,"children":6111},{"style":642},[6112],{"type":612,"value":6113},"\"€\"",{"type":606,"tag":636,"props":6115,"children":6116},{"style":751},[6117],{"type":612,"value":6118},", \n",{"type":606,"tag":636,"props":6120,"children":6121},{"class":638,"line":1479},[6122,6127,6131,6136],{"type":606,"tag":636,"props":6123,"children":6124},{"style":642},[6125],{"type":612,"value":6126},"        \"GBP\"",{"type":606,"tag":636,"props":6128,"children":6129},{"style":751},[6130],{"type":612,"value":6087},{"type":606,"tag":636,"props":6132,"children":6133},{"style":642},[6134],{"type":612,"value":6135},"\"£\"",{"type":606,"tag":636,"props":6137,"children":6138},{"style":751},[6139],{"type":612,"value":3822},{"type":606,"tag":636,"props":6141,"children":6142},{"class":638,"line":1505},[6143,6148,6152],{"type":606,"tag":636,"props":6144,"children":6145},{"style":642},[6146],{"type":612,"value":6147},"        \"JPY\"",{"type":606,"tag":636,"props":6149,"children":6150},{"style":751},[6151],{"type":612,"value":6087},{"type":606,"tag":636,"props":6153,"children":6154},{"style":642},[6155],{"type":612,"value":6156},"\"¥\"\n",{"type":606,"tag":636,"props":6158,"children":6159},{"class":638,"line":1530},[6160],{"type":606,"tag":636,"props":6161,"children":6162},{"style":751},[6163],{"type":612,"value":6164},"    }\n",{"type":606,"tag":636,"props":6166,"children":6167},{"class":638,"line":1538},[6168],{"type":606,"tag":636,"props":6169,"children":6170},{"style":751},[6171],{"type":612,"value":842},{"type":606,"tag":636,"props":6173,"children":6174},{"class":638,"line":1548},[6175,6179,6184,6189,6194],{"type":606,"tag":636,"props":6176,"children":6177},{"style":745},[6178],{"type":612,"value":3219},{"type":606,"tag":636,"props":6180,"children":6181},{"style":751},[6182],{"type":612,"value":6183}," currency ",{"type":606,"tag":636,"props":6185,"children":6186},{"style":745},[6187],{"type":612,"value":6188},"not",{"type":606,"tag":636,"props":6190,"children":6191},{"style":745},[6192],{"type":612,"value":6193}," in",{"type":606,"tag":636,"props":6195,"children":6196},{"style":751},[6197],{"type":612,"value":6198}," symbols:\n",{"type":606,"tag":636,"props":6200,"children":6201},{"class":638,"line":1577},[6202,6206,6210,6214,6218,6223,6227,6232,6236,6240],{"type":606,"tag":636,"props":6203,"children":6204},{"style":745},[6205],{"type":612,"value":3262},{"type":606,"tag":636,"props":6207,"children":6208},{"style":975},[6209],{"type":612,"value":1132},{"type":606,"tag":636,"props":6211,"children":6212},{"style":751},[6213],{"type":612,"value":1137},{"type":606,"tag":636,"props":6215,"children":6216},{"style":745},[6217],{"type":612,"value":4588},{"type":606,"tag":636,"props":6219,"children":6220},{"style":642},[6221],{"type":612,"value":6222},"\"Unsupported currency: ",{"type":606,"tag":636,"props":6224,"children":6225},{"style":975},[6226],{"type":612,"value":3802},{"type":606,"tag":636,"props":6228,"children":6229},{"style":751},[6230],{"type":612,"value":6231},"currency",{"type":606,"tag":636,"props":6233,"children":6234},{"style":975},[6235],{"type":612,"value":3812},{"type":606,"tag":636,"props":6237,"children":6238},{"style":642},[6239],{"type":612,"value":3817},{"type":606,"tag":636,"props":6241,"children":6242},{"style":751},[6243],{"type":612,"value":1147},{"type":606,"tag":636,"props":6245,"children":6246},{"class":638,"line":1638},[6247],{"type":606,"tag":636,"props":6248,"children":6249},{"style":751},[6250],{"type":612,"value":842},{"type":606,"tag":636,"props":6252,"children":6253},{"class":638,"line":1666},[6254,6259,6263],{"type":606,"tag":636,"props":6255,"children":6256},{"style":751},[6257],{"type":612,"value":6258},"    symbol ",{"type":606,"tag":636,"props":6260,"children":6261},{"style":745},[6262],{"type":612,"value":1172},{"type":606,"tag":636,"props":6264,"children":6265},{"style":751},[6266],{"type":612,"value":6267}," symbols[currency]\n",{"type":606,"tag":636,"props":6269,"children":6270},{"class":638,"line":1675},[6271],{"type":606,"tag":636,"props":6272,"children":6273},{"style":751},[6274],{"type":612,"value":842},{"type":606,"tag":636,"props":6276,"children":6277},{"class":638,"line":1683},[6278],{"type":606,"tag":636,"props":6279,"children":6280},{"style":1542},[6281],{"type":612,"value":6282},"    # Format with thousands separator and 2 decimal places\n",{"type":606,"tag":636,"props":6284,"children":6285},{"class":638,"line":1692},[6286,6290,6294,6299,6304],{"type":606,"tag":636,"props":6287,"children":6288},{"style":745},[6289],{"type":612,"value":3219},{"type":606,"tag":636,"props":6291,"children":6292},{"style":751},[6293],{"type":612,"value":6007},{"type":606,"tag":636,"props":6295,"children":6296},{"style":745},[6297],{"type":612,"value":6298},">=",{"type":606,"tag":636,"props":6300,"children":6301},{"style":975},[6302],{"type":612,"value":6303}," 1000",{"type":606,"tag":636,"props":6305,"children":6306},{"style":751},[6307],{"type":612,"value":818},{"type":606,"tag":636,"props":6309,"children":6310},{"class":638,"line":1710},[6311,6315,6319,6323,6327,6332,6337,6342,6347,6351],{"type":606,"tag":636,"props":6312,"children":6313},{"style":745},[6314],{"type":612,"value":2082},{"type":606,"tag":636,"props":6316,"children":6317},{"style":745},[6318],{"type":612,"value":3987},{"type":606,"tag":636,"props":6320,"children":6321},{"style":642},[6322],{"type":612,"value":3817},{"type":606,"tag":636,"props":6324,"children":6325},{"style":975},[6326],{"type":612,"value":3802},{"type":606,"tag":636,"props":6328,"children":6329},{"style":751},[6330],{"type":612,"value":6331},"symbol",{"type":606,"tag":636,"props":6333,"children":6334},{"style":975},[6335],{"type":612,"value":6336},"}{",{"type":606,"tag":636,"props":6338,"children":6339},{"style":751},[6340],{"type":612,"value":6341},"amount",{"type":606,"tag":636,"props":6343,"children":6344},{"style":745},[6345],{"type":612,"value":6346},":,.2f",{"type":606,"tag":636,"props":6348,"children":6349},{"style":975},[6350],{"type":612,"value":3812},{"type":606,"tag":636,"props":6352,"children":6353},{"style":642},[6354],{"type":612,"value":4067},{"type":606,"tag":636,"props":6356,"children":6357},{"class":638,"line":1724},[6358,6363],{"type":606,"tag":636,"props":6359,"children":6360},{"style":745},[6361],{"type":612,"value":6362},"    else",{"type":606,"tag":636,"props":6364,"children":6365},{"style":751},[6366],{"type":612,"value":818},{"type":606,"tag":636,"props":6368,"children":6369},{"class":638,"line":1738},[6370,6374,6378,6382,6386,6390,6394,6398,6402,6406],{"type":606,"tag":636,"props":6371,"children":6372},{"style":745},[6373],{"type":612,"value":2082},{"type":606,"tag":636,"props":6375,"children":6376},{"style":745},[6377],{"type":612,"value":3987},{"type":606,"tag":636,"props":6379,"children":6380},{"style":642},[6381],{"type":612,"value":3817},{"type":606,"tag":636,"props":6383,"children":6384},{"style":975},[6385],{"type":612,"value":3802},{"type":606,"tag":636,"props":6387,"children":6388},{"style":751},[6389],{"type":612,"value":6331},{"type":606,"tag":636,"props":6391,"children":6392},{"style":975},[6393],{"type":612,"value":6336},{"type":606,"tag":636,"props":6395,"children":6396},{"style":751},[6397],{"type":612,"value":6341},{"type":606,"tag":636,"props":6399,"children":6400},{"style":745},[6401],{"type":612,"value":4058},{"type":606,"tag":636,"props":6403,"children":6404},{"style":975},[6405],{"type":612,"value":3812},{"type":606,"tag":636,"props":6407,"children":6408},{"style":642},[6409],{"type":612,"value":4067},{"type":606,"tag":636,"props":6411,"children":6412},{"class":638,"line":1752},[6413],{"type":606,"tag":636,"props":6414,"children":6415},{"emptyLinePlaceholder":13},[6416],{"type":612,"value":661},{"type":606,"tag":636,"props":6418,"children":6419},{"class":638,"line":1766},[6420],{"type":606,"tag":636,"props":6421,"children":6422},{"emptyLinePlaceholder":13},[6423],{"type":612,"value":661},{"type":606,"tag":636,"props":6425,"children":6426},{"class":638,"line":1775},[6427,6431,6436,6441,6445],{"type":606,"tag":636,"props":6428,"children":6429},{"style":745},[6430],{"type":612,"value":2951},{"type":606,"tag":636,"props":6432,"children":6433},{"style":810},[6434],{"type":612,"value":6435}," chunk_list",{"type":606,"tag":636,"props":6437,"children":6438},{"style":751},[6439],{"type":612,"value":6440},"(items: List, chunk_size: ",{"type":606,"tag":636,"props":6442,"children":6443},{"style":975},[6444],{"type":612,"value":1267},{"type":606,"tag":636,"props":6446,"children":6447},{"style":751},[6448],{"type":612,"value":6449},") -> List[List]:\n",{"type":606,"tag":636,"props":6451,"children":6452},{"class":638,"line":1788},[6453],{"type":606,"tag":636,"props":6454,"children":6455},{"style":642},[6456],{"type":612,"value":826},{"type":606,"tag":636,"props":6458,"children":6459},{"class":638,"line":1796},[6460],{"type":606,"tag":636,"props":6461,"children":6462},{"style":642},[6463],{"type":612,"value":6464},"    Split a list into smaller chunks of specified size.\n",{"type":606,"tag":636,"props":6466,"children":6467},{"class":638,"line":1830},[6468],{"type":606,"tag":636,"props":6469,"children":6470},{"style":642},[6471],{"type":612,"value":842},{"type":606,"tag":636,"props":6473,"children":6474},{"class":638,"line":1838},[6475],{"type":606,"tag":636,"props":6476,"children":6477},{"style":642},[6478],{"type":612,"value":6479},"    This is useful for processing large lists in smaller batches,\n",{"type":606,"tag":636,"props":6481,"children":6482},{"class":638,"line":1847},[6483],{"type":606,"tag":636,"props":6484,"children":6485},{"style":642},[6486],{"type":612,"value":6487},"    such as when making API calls or database operations.\n",{"type":606,"tag":636,"props":6489,"children":6490},{"class":638,"line":1855},[6491],{"type":606,"tag":636,"props":6492,"children":6493},{"style":642},[6494],{"type":612,"value":842},{"type":606,"tag":636,"props":6496,"children":6497},{"class":638,"line":1863},[6498],{"type":606,"tag":636,"props":6499,"children":6500},{"style":642},[6501],{"type":612,"value":3046},{"type":606,"tag":636,"props":6503,"children":6504},{"class":638,"line":1872},[6505],{"type":606,"tag":636,"props":6506,"children":6507},{"style":642},[6508],{"type":612,"value":6509},"        items (List): The list to split into chunks\n",{"type":606,"tag":636,"props":6511,"children":6512},{"class":638,"line":1880},[6513],{"type":606,"tag":636,"props":6514,"children":6515},{"style":642},[6516],{"type":612,"value":6517},"        chunk_size (int): Maximum size of each chunk\n",{"type":606,"tag":636,"props":6519,"children":6520},{"class":638,"line":1889},[6521],{"type":606,"tag":636,"props":6522,"children":6523},{"style":642},[6524],{"type":612,"value":897},{"type":606,"tag":636,"props":6526,"children":6527},{"class":638,"line":1898},[6528],{"type":606,"tag":636,"props":6529,"children":6530},{"style":642},[6531],{"type":612,"value":3081},{"type":606,"tag":636,"props":6533,"children":6534},{"class":638,"line":1906},[6535],{"type":606,"tag":636,"props":6536,"children":6537},{"style":642},[6538],{"type":612,"value":6539},"        List[List]: List of chunks, where each chunk is a list\n",{"type":606,"tag":636,"props":6541,"children":6542},{"class":638,"line":1914},[6543],{"type":606,"tag":636,"props":6544,"children":6545},{"style":642},[6546],{"type":612,"value":897},{"type":606,"tag":636,"props":6548,"children":6549},{"class":638,"line":1927},[6550],{"type":606,"tag":636,"props":6551,"children":6552},{"style":642},[6553],{"type":612,"value":3107},{"type":606,"tag":636,"props":6555,"children":6556},{"class":638,"line":1940},[6557],{"type":606,"tag":636,"props":6558,"children":6559},{"style":642},[6560],{"type":612,"value":6561},"        ValueError: If chunk_size is not positive\n",{"type":606,"tag":636,"props":6563,"children":6564},{"class":638,"line":1949},[6565],{"type":606,"tag":636,"props":6566,"children":6567},{"style":642},[6568],{"type":612,"value":897},{"type":606,"tag":636,"props":6570,"children":6571},{"class":638,"line":1962},[6572],{"type":606,"tag":636,"props":6573,"children":6574},{"style":642},[6575],{"type":612,"value":5928},{"type":606,"tag":636,"props":6577,"children":6578},{"class":638,"line":1971},[6579,6583],{"type":606,"tag":636,"props":6580,"children":6581},{"style":745},[6582],{"type":612,"value":913},{"type":606,"tag":636,"props":6584,"children":6585},{"style":642},[6586],{"type":612,"value":6587},"chunk_list([1, 2, 3, 4, 5], 2)\n",{"type":606,"tag":636,"props":6589,"children":6590},{"class":638,"line":1979},[6591],{"type":606,"tag":636,"props":6592,"children":6593},{"style":642},[6594],{"type":612,"value":6595},"        [[1, 2], [3, 4], [5]]\n",{"type":606,"tag":636,"props":6597,"children":6598},{"class":638,"line":2015},[6599,6603],{"type":606,"tag":636,"props":6600,"children":6601},{"style":745},[6602],{"type":612,"value":913},{"type":606,"tag":636,"props":6604,"children":6605},{"style":642},[6606],{"type":612,"value":6607},"chunk_list([], 3)\n",{"type":606,"tag":636,"props":6609,"children":6610},{"class":638,"line":2044},[6611],{"type":606,"tag":636,"props":6612,"children":6613},{"style":642},[6614],{"type":612,"value":6615},"        []\n",{"type":606,"tag":636,"props":6617,"children":6618},{"class":638,"line":2062},[6619,6623],{"type":606,"tag":636,"props":6620,"children":6621},{"style":745},[6622],{"type":612,"value":913},{"type":606,"tag":636,"props":6624,"children":6625},{"style":642},[6626],{"type":612,"value":6627},"chunk_list([1, 2, 3], 5)\n",{"type":606,"tag":636,"props":6629,"children":6630},{"class":638,"line":2076},[6631],{"type":606,"tag":636,"props":6632,"children":6633},{"style":642},[6634],{"type":612,"value":6635},"        [[1, 2, 3]]\n",{"type":606,"tag":636,"props":6637,"children":6638},{"class":638,"line":2090},[6639],{"type":606,"tag":636,"props":6640,"children":6641},{"style":642},[6642],{"type":612,"value":897},{"type":606,"tag":636,"props":6644,"children":6645},{"class":638,"line":2098},[6646],{"type":606,"tag":636,"props":6647,"children":6648},{"style":642},[6649],{"type":612,"value":3133},{"type":606,"tag":636,"props":6651,"children":6652},{"class":638,"line":2124},[6653],{"type":606,"tag":636,"props":6654,"children":6655},{"style":642},[6656],{"type":612,"value":6657},"        The last chunk may contain fewer items than chunk_size\n",{"type":606,"tag":636,"props":6659,"children":6660},{"class":638,"line":2132},[6661],{"type":606,"tag":636,"props":6662,"children":6663},{"style":642},[6664],{"type":612,"value":6665},"        if the total number of items is not evenly divisible.\n",{"type":606,"tag":636,"props":6667,"children":6668},{"class":638,"line":2141},[6669],{"type":606,"tag":636,"props":6670,"children":6671},{"style":642},[6672],{"type":612,"value":826},{"type":606,"tag":636,"props":6674,"children":6675},{"class":638,"line":2149},[6676,6680,6685,6689,6693],{"type":606,"tag":636,"props":6677,"children":6678},{"style":745},[6679],{"type":612,"value":3219},{"type":606,"tag":636,"props":6681,"children":6682},{"style":751},[6683],{"type":612,"value":6684}," chunk_size ",{"type":606,"tag":636,"props":6686,"children":6687},{"style":745},[6688],{"type":612,"value":1494},{"type":606,"tag":636,"props":6690,"children":6691},{"style":975},[6692],{"type":612,"value":1096},{"type":606,"tag":636,"props":6694,"children":6695},{"style":751},[6696],{"type":612,"value":818},{"type":606,"tag":636,"props":6698,"children":6699},{"class":638,"line":2157},[6700,6704,6708,6712,6717],{"type":606,"tag":636,"props":6701,"children":6702},{"style":745},[6703],{"type":612,"value":3262},{"type":606,"tag":636,"props":6705,"children":6706},{"style":975},[6707],{"type":612,"value":1132},{"type":606,"tag":636,"props":6709,"children":6710},{"style":751},[6711],{"type":612,"value":1137},{"type":606,"tag":636,"props":6713,"children":6714},{"style":642},[6715],{"type":612,"value":6716},"\"Chunk size must be positive\"",{"type":606,"tag":636,"props":6718,"children":6719},{"style":751},[6720],{"type":612,"value":1147},{"type":606,"tag":636,"props":6722,"children":6723},{"class":638,"line":2166},[6724],{"type":606,"tag":636,"props":6725,"children":6726},{"style":751},[6727],{"type":612,"value":842},{"type":606,"tag":636,"props":6729,"children":6730},{"class":638,"line":2174},[6731,6735,6739],{"type":606,"tag":636,"props":6732,"children":6733},{"style":745},[6734],{"type":612,"value":3219},{"type":606,"tag":636,"props":6736,"children":6737},{"style":745},[6738],{"type":612,"value":5612},{"type":606,"tag":636,"props":6740,"children":6741},{"style":751},[6742],{"type":612,"value":6743}," items:\n",{"type":606,"tag":636,"props":6745,"children":6746},{"class":638,"line":2182},[6747,6751],{"type":606,"tag":636,"props":6748,"children":6749},{"style":745},[6750],{"type":612,"value":2082},{"type":606,"tag":636,"props":6752,"children":6753},{"style":751},[6754],{"type":612,"value":1177},{"type":606,"tag":636,"props":6756,"children":6757},{"class":638,"line":2195},[6758],{"type":606,"tag":636,"props":6759,"children":6760},{"style":751},[6761],{"type":612,"value":842},{"type":606,"tag":636,"props":6763,"children":6764},{"class":638,"line":2208},[6765,6770,6774],{"type":606,"tag":636,"props":6766,"children":6767},{"style":751},[6768],{"type":612,"value":6769},"    chunks ",{"type":606,"tag":636,"props":6771,"children":6772},{"style":745},[6773],{"type":612,"value":1172},{"type":606,"tag":636,"props":6775,"children":6776},{"style":751},[6777],{"type":612,"value":1177},{"type":606,"tag":636,"props":6779,"children":6780},{"class":638,"line":2217},[6781,6785,6790,6794,6799,6803,6808,6812,6816],{"type":606,"tag":636,"props":6782,"children":6783},{"style":745},[6784],{"type":612,"value":3914},{"type":606,"tag":636,"props":6786,"children":6787},{"style":751},[6788],{"type":612,"value":6789}," i ",{"type":606,"tag":636,"props":6791,"children":6792},{"style":745},[6793],{"type":612,"value":1564},{"type":606,"tag":636,"props":6795,"children":6796},{"style":975},[6797],{"type":612,"value":6798}," range",{"type":606,"tag":636,"props":6800,"children":6801},{"style":751},[6802],{"type":612,"value":1137},{"type":606,"tag":636,"props":6804,"children":6805},{"style":975},[6806],{"type":612,"value":6807},"0",{"type":606,"tag":636,"props":6809,"children":6810},{"style":751},[6811],{"type":612,"value":4467},{"type":606,"tag":636,"props":6813,"children":6814},{"style":975},[6815],{"type":612,"value":3846},{"type":606,"tag":636,"props":6817,"children":6818},{"style":751},[6819],{"type":612,"value":6820},"(items), chunk_size):\n",{"type":606,"tag":636,"props":6822,"children":6823},{"class":638,"line":2225},[6824,6829,6833,6838,6842],{"type":606,"tag":636,"props":6825,"children":6826},{"style":751},[6827],{"type":612,"value":6828},"        chunk ",{"type":606,"tag":636,"props":6830,"children":6831},{"style":745},[6832],{"type":612,"value":1172},{"type":606,"tag":636,"props":6834,"children":6835},{"style":751},[6836],{"type":612,"value":6837}," items[i:i ",{"type":606,"tag":636,"props":6839,"children":6840},{"style":745},[6841],{"type":612,"value":3462},{"type":606,"tag":636,"props":6843,"children":6844},{"style":751},[6845],{"type":612,"value":6846}," chunk_size]\n",{"type":606,"tag":636,"props":6848,"children":6849},{"class":638,"line":2290},[6850],{"type":606,"tag":636,"props":6851,"children":6852},{"style":751},[6853],{"type":612,"value":6854},"        chunks.append(chunk)\n",{"type":606,"tag":636,"props":6856,"children":6857},{"class":638,"line":2298},[6858],{"type":606,"tag":636,"props":6859,"children":6860},{"style":751},[6861],{"type":612,"value":842},{"type":606,"tag":636,"props":6863,"children":6864},{"class":638,"line":2323},[6865,6869],{"type":606,"tag":636,"props":6866,"children":6867},{"style":745},[6868],{"type":612,"value":3485},{"type":606,"tag":636,"props":6870,"children":6871},{"style":751},[6872],{"type":612,"value":6873}," chunks\n",{"type":606,"tag":636,"props":6875,"children":6876},{"class":638,"line":2331},[6877],{"type":606,"tag":636,"props":6878,"children":6879},{"emptyLinePlaceholder":13},[6880],{"type":612,"value":661},{"type":606,"tag":636,"props":6882,"children":6883},{"class":638,"line":2340},[6884],{"type":606,"tag":636,"props":6885,"children":6886},{"emptyLinePlaceholder":13},[6887],{"type":612,"value":661},{"type":606,"tag":636,"props":6889,"children":6890},{"class":638,"line":2348},[6891,6895,6900],{"type":606,"tag":636,"props":6892,"children":6893},{"style":745},[6894],{"type":612,"value":807},{"type":606,"tag":636,"props":6896,"children":6897},{"style":810},[6898],{"type":612,"value":6899}," DataProcessor",{"type":606,"tag":636,"props":6901,"children":6902},{"style":751},[6903],{"type":612,"value":818},{"type":606,"tag":636,"props":6905,"children":6906},{"class":638,"line":2356},[6907],{"type":606,"tag":636,"props":6908,"children":6909},{"style":642},[6910],{"type":612,"value":826},{"type":606,"tag":636,"props":6912,"children":6913},{"class":638,"line":2365},[6914],{"type":606,"tag":636,"props":6915,"children":6916},{"style":642},[6917],{"type":612,"value":6918},"    A utility class for processing and transforming data.\n",{"type":606,"tag":636,"props":6920,"children":6921},{"class":638,"line":2373},[6922],{"type":606,"tag":636,"props":6923,"children":6924},{"style":642},[6925],{"type":612,"value":842},{"type":606,"tag":636,"props":6927,"children":6928},{"class":638,"line":2381},[6929],{"type":606,"tag":636,"props":6930,"children":6931},{"style":642},[6932],{"type":612,"value":6933},"    This class provides methods for common data processing tasks\n",{"type":606,"tag":636,"props":6935,"children":6936},{"class":638,"line":2394},[6937],{"type":606,"tag":636,"props":6938,"children":6939},{"style":642},[6940],{"type":612,"value":6941},"    like filtering, transforming, and aggregating data sets.\n",{"type":606,"tag":636,"props":6943,"children":6944},{"class":638,"line":2407},[6945],{"type":606,"tag":636,"props":6946,"children":6947},{"style":642},[6948],{"type":612,"value":842},{"type":606,"tag":636,"props":6950,"children":6951},{"class":638,"line":2419},[6952],{"type":606,"tag":636,"props":6953,"children":6954},{"style":642},[6955],{"type":612,"value":873},{"type":606,"tag":636,"props":6957,"children":6958},{"class":638,"line":2428},[6959],{"type":606,"tag":636,"props":6960,"children":6961},{"style":642},[6962],{"type":612,"value":6963},"        data (List): The current dataset being processed\n",{"type":606,"tag":636,"props":6965,"children":6966},{"class":638,"line":2436},[6967],{"type":606,"tag":636,"props":6968,"children":6969},{"style":642},[6970],{"type":612,"value":6971},"        processed_count (int): Number of items processed\n",{"type":606,"tag":636,"props":6973,"children":6974},{"class":638,"line":2458},[6975],{"type":606,"tag":636,"props":6976,"children":6977},{"style":642},[6978],{"type":612,"value":897},{"type":606,"tag":636,"props":6980,"children":6981},{"class":638,"line":2489},[6982],{"type":606,"tag":636,"props":6983,"children":6984},{"style":642},[6985],{"type":612,"value":905},{"type":606,"tag":636,"props":6987,"children":6988},{"class":638,"line":2516},[6989,6993],{"type":606,"tag":636,"props":6990,"children":6991},{"style":745},[6992],{"type":612,"value":913},{"type":606,"tag":636,"props":6994,"children":6995},{"style":642},[6996],{"type":612,"value":6997},"processor = DataProcessor([1, 2, 3, 4, 5])\n",{"type":606,"tag":636,"props":6999,"children":7000},{"class":638,"line":2543},[7001,7005],{"type":606,"tag":636,"props":7002,"children":7003},{"style":745},[7004],{"type":612,"value":913},{"type":606,"tag":636,"props":7006,"children":7007},{"style":642},[7008],{"type":612,"value":7009},"processor.filter_even()\n",{"type":606,"tag":636,"props":7011,"children":7012},{"class":638,"line":2551},[7013,7017],{"type":606,"tag":636,"props":7014,"children":7015},{"style":745},[7016],{"type":612,"value":913},{"type":606,"tag":636,"props":7018,"children":7019},{"style":642},[7020],{"type":612,"value":7021},"processor.get_data()\n",{"type":606,"tag":636,"props":7023,"children":7024},{"class":638,"line":2576},[7025],{"type":606,"tag":636,"props":7026,"children":7027},{"style":642},[7028],{"type":612,"value":7029},"        [2, 4]\n",{"type":606,"tag":636,"props":7031,"children":7032},{"class":638,"line":2584},[7033],{"type":606,"tag":636,"props":7034,"children":7035},{"style":642},[7036],{"type":612,"value":826},{"type":606,"tag":636,"props":7038,"children":7039},{"class":638,"line":2593},[7040],{"type":606,"tag":636,"props":7041,"children":7042},{"style":751},[7043],{"type":612,"value":842},{"type":606,"tag":636,"props":7045,"children":7046},{"class":638,"line":2601},[7047,7051,7055,7060,7064,7069],{"type":606,"tag":636,"props":7048,"children":7049},{"style":745},[7050],{"type":612,"value":972},{"type":606,"tag":636,"props":7052,"children":7053},{"style":975},[7054],{"type":612,"value":978},{"type":606,"tag":636,"props":7056,"children":7057},{"style":751},[7058],{"type":612,"value":7059},"(self, data: List ",{"type":606,"tag":636,"props":7061,"children":7062},{"style":745},[7063],{"type":612,"value":1172},{"type":606,"tag":636,"props":7065,"children":7066},{"style":975},[7067],{"type":612,"value":7068}," None",{"type":606,"tag":636,"props":7070,"children":7071},{"style":751},[7072],{"type":612,"value":1003},{"type":606,"tag":636,"props":7074,"children":7075},{"class":638,"line":2609},[7076],{"type":606,"tag":636,"props":7077,"children":7078},{"style":642},[7079],{"type":612,"value":1011},{"type":606,"tag":636,"props":7081,"children":7082},{"class":638,"line":2618},[7083],{"type":606,"tag":636,"props":7084,"children":7085},{"style":642},[7086],{"type":612,"value":7087},"        Initialize the data processor.\n",{"type":606,"tag":636,"props":7089,"children":7090},{"class":638,"line":2626},[7091],{"type":606,"tag":636,"props":7092,"children":7093},{"style":642},[7094],{"type":612,"value":897},{"type":606,"tag":636,"props":7096,"children":7097},{"class":638,"line":2635},[7098],{"type":606,"tag":636,"props":7099,"children":7100},{"style":642},[7101],{"type":612,"value":1034},{"type":606,"tag":636,"props":7103,"children":7104},{"class":638,"line":2644},[7105],{"type":606,"tag":636,"props":7106,"children":7107},{"style":642},[7108],{"type":612,"value":7109},"            data (List, optional): Initial data to process. Defaults to empty list.\n",{"type":606,"tag":636,"props":7111,"children":7112},{"class":638,"line":2653},[7113],{"type":606,"tag":636,"props":7114,"children":7115},{"style":642},[7116],{"type":612,"value":1011},{"type":606,"tag":636,"props":7118,"children":7119},{"class":638,"line":2661},[7120,7124,7129,7133,7138,7142,7146,7151,7155,7159,7164],{"type":606,"tag":636,"props":7121,"children":7122},{"style":975},[7123],{"type":612,"value":1162},{"type":606,"tag":636,"props":7125,"children":7126},{"style":751},[7127],{"type":612,"value":7128},".data ",{"type":606,"tag":636,"props":7130,"children":7131},{"style":745},[7132],{"type":612,"value":1172},{"type":606,"tag":636,"props":7134,"children":7135},{"style":751},[7136],{"type":612,"value":7137}," data ",{"type":606,"tag":636,"props":7139,"children":7140},{"style":745},[7141],{"type":612,"value":5092},{"type":606,"tag":636,"props":7143,"children":7144},{"style":751},[7145],{"type":612,"value":7137},{"type":606,"tag":636,"props":7147,"children":7148},{"style":745},[7149],{"type":612,"value":7150},"is",{"type":606,"tag":636,"props":7152,"children":7153},{"style":745},[7154],{"type":612,"value":5612},{"type":606,"tag":636,"props":7156,"children":7157},{"style":975},[7158],{"type":612,"value":7068},{"type":606,"tag":636,"props":7160,"children":7161},{"style":745},[7162],{"type":612,"value":7163}," else",{"type":606,"tag":636,"props":7165,"children":7166},{"style":751},[7167],{"type":612,"value":1177},{"type":606,"tag":636,"props":7169,"children":7170},{"class":638,"line":2705},[7171,7175,7180,7184],{"type":606,"tag":636,"props":7172,"children":7173},{"style":975},[7174],{"type":612,"value":1162},{"type":606,"tag":636,"props":7176,"children":7177},{"style":751},[7178],{"type":612,"value":7179},".processed_count ",{"type":606,"tag":636,"props":7181,"children":7182},{"style":745},[7183],{"type":612,"value":1172},{"type":606,"tag":636,"props":7185,"children":7186},{"style":975},[7187],{"type":612,"value":2820},{"type":606,"tag":636,"props":7189,"children":7190},{"class":638,"line":2713},[7191],{"type":606,"tag":636,"props":7192,"children":7193},{"style":751},[7194],{"type":612,"value":842},{"type":606,"tag":636,"props":7196,"children":7197},{"class":638,"line":2738},[7198,7202,7207,7211,7216],{"type":606,"tag":636,"props":7199,"children":7200},{"style":745},[7201],{"type":612,"value":972},{"type":606,"tag":636,"props":7203,"children":7204},{"style":810},[7205],{"type":612,"value":7206}," filter_even",{"type":606,"tag":636,"props":7208,"children":7209},{"style":751},[7210],{"type":612,"value":2113},{"type":606,"tag":636,"props":7212,"children":7213},{"style":642},[7214],{"type":612,"value":7215},"'DataProcessor'",{"type":606,"tag":636,"props":7217,"children":7218},{"style":751},[7219],{"type":612,"value":818},{"type":606,"tag":636,"props":7221,"children":7222},{"class":638,"line":2746},[7223],{"type":606,"tag":636,"props":7224,"children":7225},{"style":642},[7226],{"type":612,"value":1011},{"type":606,"tag":636,"props":7228,"children":7229},{"class":638,"line":2755},[7230],{"type":606,"tag":636,"props":7231,"children":7232},{"style":642},[7233],{"type":612,"value":7234},"        Filter the data to keep only even numbers.\n",{"type":606,"tag":636,"props":7236,"children":7237},{"class":638,"line":2763},[7238],{"type":606,"tag":636,"props":7239,"children":7240},{"style":642},[7241],{"type":612,"value":897},{"type":606,"tag":636,"props":7243,"children":7244},{"class":638,"line":2771},[7245],{"type":606,"tag":636,"props":7246,"children":7247},{"style":642},[7248],{"type":612,"value":1886},{"type":606,"tag":636,"props":7250,"children":7251},{"class":638,"line":2780},[7252],{"type":606,"tag":636,"props":7253,"children":7254},{"style":642},[7255],{"type":612,"value":7256},"            DataProcessor: Self, for method chaining\n",{"type":606,"tag":636,"props":7258,"children":7259},{"class":638,"line":2788},[7260],{"type":606,"tag":636,"props":7261,"children":7262},{"style":642},[7263],{"type":612,"value":1050},{"type":606,"tag":636,"props":7265,"children":7266},{"class":638,"line":2823},[7267],{"type":606,"tag":636,"props":7268,"children":7269},{"style":642},[7270],{"type":612,"value":1058},{"type":606,"tag":636,"props":7272,"children":7273},{"class":638,"line":2831},[7274],{"type":606,"tag":636,"props":7275,"children":7276},{"style":642},[7277],{"type":612,"value":7278},"            TypeError: If data contains non-numeric values\n",{"type":606,"tag":636,"props":7280,"children":7281},{"class":638,"line":2856},[7282],{"type":606,"tag":636,"props":7283,"children":7284},{"style":642},[7285],{"type":612,"value":1050},{"type":606,"tag":636,"props":7287,"children":7288},{"class":638,"line":2864},[7289],{"type":606,"tag":636,"props":7290,"children":7291},{"style":642},[7292],{"type":612,"value":1382},{"type":606,"tag":636,"props":7294,"children":7295},{"class":638,"line":2873},[7296,7300],{"type":606,"tag":636,"props":7297,"children":7298},{"style":745},[7299],{"type":612,"value":1391},{"type":606,"tag":636,"props":7301,"children":7302},{"style":642},[7303],{"type":612,"value":7304},"processor = DataProcessor([1, 2, 3, 4, 5, 6])\n",{"type":606,"tag":636,"props":7306,"children":7307},{"class":638,"line":2881},[7308,7312],{"type":606,"tag":636,"props":7309,"children":7310},{"style":745},[7311],{"type":612,"value":1391},{"type":606,"tag":636,"props":7313,"children":7314},{"style":642},[7315],{"type":612,"value":7316},"processor.filter_even().get_data()\n",{"type":606,"tag":636,"props":7318,"children":7319},{"class":638,"line":2890},[7320],{"type":606,"tag":636,"props":7321,"children":7322},{"style":642},[7323],{"type":612,"value":7324},"            [2, 4, 6]\n",{"type":606,"tag":636,"props":7326,"children":7327},{"class":638,"line":2899},[7328],{"type":606,"tag":636,"props":7329,"children":7330},{"style":642},[7331],{"type":612,"value":1011},{"type":606,"tag":636,"props":7333,"children":7334},{"class":638,"line":2908},[7335,7340],{"type":606,"tag":636,"props":7336,"children":7337},{"style":745},[7338],{"type":612,"value":7339},"        try",{"type":606,"tag":636,"props":7341,"children":7342},{"style":751},[7343],{"type":612,"value":818},{"type":606,"tag":636,"props":7345,"children":7346},{"class":638,"line":2916},[7347,7352,7356,7360,7365,7369,7374,7378,7382,7386,7390,7394,7399,7403,7407,7411,7416,7420,7424,7429,7434,7438,7442],{"type":606,"tag":636,"props":7348,"children":7349},{"style":975},[7350],{"type":612,"value":7351},"            self",{"type":606,"tag":636,"props":7353,"children":7354},{"style":751},[7355],{"type":612,"value":7128},{"type":606,"tag":636,"props":7357,"children":7358},{"style":745},[7359],{"type":612,"value":1172},{"type":606,"tag":636,"props":7361,"children":7362},{"style":751},[7363],{"type":612,"value":7364}," [x ",{"type":606,"tag":636,"props":7366,"children":7367},{"style":745},[7368],{"type":612,"value":2270},{"type":606,"tag":636,"props":7370,"children":7371},{"style":751},[7372],{"type":612,"value":7373}," x ",{"type":606,"tag":636,"props":7375,"children":7376},{"style":745},[7377],{"type":612,"value":1564},{"type":606,"tag":636,"props":7379,"children":7380},{"style":975},[7381],{"type":612,"value":1569},{"type":606,"tag":636,"props":7383,"children":7384},{"style":751},[7385],{"type":612,"value":7128},{"type":606,"tag":636,"props":7387,"children":7388},{"style":745},[7389],{"type":612,"value":5092},{"type":606,"tag":636,"props":7391,"children":7392},{"style":975},[7393],{"type":612,"value":5631},{"type":606,"tag":636,"props":7395,"children":7396},{"style":751},[7397],{"type":612,"value":7398},"(x, (",{"type":606,"tag":636,"props":7400,"children":7401},{"style":975},[7402],{"type":612,"value":1267},{"type":606,"tag":636,"props":7404,"children":7405},{"style":751},[7406],{"type":612,"value":4467},{"type":606,"tag":636,"props":7408,"children":7409},{"style":975},[7410],{"type":612,"value":988},{"type":606,"tag":636,"props":7412,"children":7413},{"style":751},[7414],{"type":612,"value":7415},")) ",{"type":606,"tag":636,"props":7417,"children":7418},{"style":745},[7419],{"type":612,"value":1613},{"type":606,"tag":636,"props":7421,"children":7422},{"style":751},[7423],{"type":612,"value":7373},{"type":606,"tag":636,"props":7425,"children":7426},{"style":745},[7427],{"type":612,"value":7428},"%",{"type":606,"tag":636,"props":7430,"children":7431},{"style":975},[7432],{"type":612,"value":7433}," 2",{"type":606,"tag":636,"props":7435,"children":7436},{"style":745},[7437],{"type":612,"value":5102},{"type":606,"tag":636,"props":7439,"children":7440},{"style":975},[7441],{"type":612,"value":1096},{"type":606,"tag":636,"props":7443,"children":7444},{"style":751},[7445],{"type":612,"value":3969},{"type":606,"tag":636,"props":7447,"children":7448},{"class":638,"line":2929},[7449,7453,7457,7461],{"type":606,"tag":636,"props":7450,"children":7451},{"style":975},[7452],{"type":612,"value":7351},{"type":606,"tag":636,"props":7454,"children":7455},{"style":751},[7456],{"type":612,"value":7179},{"type":606,"tag":636,"props":7458,"children":7459},{"style":745},[7460],{"type":612,"value":1658},{"type":606,"tag":636,"props":7462,"children":7463},{"style":975},[7464],{"type":612,"value":7465}," 1\n",{"type":606,"tag":636,"props":7467,"children":7468},{"class":638,"line":2937},[7469,7474],{"type":606,"tag":636,"props":7470,"children":7471},{"style":745},[7472],{"type":612,"value":7473},"            return",{"type":606,"tag":636,"props":7475,"children":7476},{"style":975},[7477],{"type":612,"value":7478}," self\n",{"type":606,"tag":636,"props":7480,"children":7481},{"class":638,"line":2945},[7482,7487,7492,7497],{"type":606,"tag":636,"props":7483,"children":7484},{"style":745},[7485],{"type":612,"value":7486},"        except",{"type":606,"tag":636,"props":7488,"children":7489},{"style":975},[7490],{"type":612,"value":7491}," TypeError",{"type":606,"tag":636,"props":7493,"children":7494},{"style":745},[7495],{"type":612,"value":7496}," as",{"type":606,"tag":636,"props":7498,"children":7499},{"style":751},[7500],{"type":612,"value":7501}," e:\n",{"type":606,"tag":636,"props":7503,"children":7504},{"class":638,"line":2989},[7505,7509,7513,7517,7522,7527,7531],{"type":606,"tag":636,"props":7506,"children":7507},{"style":745},[7508],{"type":612,"value":1127},{"type":606,"tag":636,"props":7510,"children":7511},{"style":975},[7512],{"type":612,"value":7491},{"type":606,"tag":636,"props":7514,"children":7515},{"style":751},[7516],{"type":612,"value":1137},{"type":606,"tag":636,"props":7518,"children":7519},{"style":642},[7520],{"type":612,"value":7521},"\"Data must contain only numeric values\"",{"type":606,"tag":636,"props":7523,"children":7524},{"style":751},[7525],{"type":612,"value":7526},") ",{"type":606,"tag":636,"props":7528,"children":7529},{"style":745},[7530],{"type":612,"value":748},{"type":606,"tag":636,"props":7532,"children":7533},{"style":751},[7534],{"type":612,"value":7535}," e\n",{"type":606,"tag":636,"props":7537,"children":7538},{"class":638,"line":2997},[7539],{"type":606,"tag":636,"props":7540,"children":7541},{"style":751},[7542],{"type":612,"value":842},{"type":606,"tag":636,"props":7544,"children":7545},{"class":638,"line":3006},[7546,7550,7555,7560,7564,7568,7572,7577,7581],{"type":606,"tag":636,"props":7547,"children":7548},{"style":745},[7549],{"type":612,"value":972},{"type":606,"tag":636,"props":7551,"children":7552},{"style":810},[7553],{"type":612,"value":7554}," multiply_by",{"type":606,"tag":636,"props":7556,"children":7557},{"style":751},[7558],{"type":612,"value":7559},"(self, factor: Union[",{"type":606,"tag":636,"props":7561,"children":7562},{"style":975},[7563],{"type":612,"value":1267},{"type":606,"tag":636,"props":7565,"children":7566},{"style":751},[7567],{"type":612,"value":4467},{"type":606,"tag":636,"props":7569,"children":7570},{"style":975},[7571],{"type":612,"value":988},{"type":606,"tag":636,"props":7573,"children":7574},{"style":751},[7575],{"type":612,"value":7576},"]) -> ",{"type":606,"tag":636,"props":7578,"children":7579},{"style":642},[7580],{"type":612,"value":7215},{"type":606,"tag":636,"props":7582,"children":7583},{"style":751},[7584],{"type":612,"value":818},{"type":606,"tag":636,"props":7586,"children":7587},{"class":638,"line":3014},[7588],{"type":606,"tag":636,"props":7589,"children":7590},{"style":642},[7591],{"type":612,"value":1011},{"type":606,"tag":636,"props":7593,"children":7594},{"class":638,"line":3023},[7595],{"type":606,"tag":636,"props":7596,"children":7597},{"style":642},[7598],{"type":612,"value":7599},"        Multiply all values in the data by a factor.\n",{"type":606,"tag":636,"props":7601,"children":7602},{"class":638,"line":3032},[7603],{"type":606,"tag":636,"props":7604,"children":7605},{"style":642},[7606],{"type":612,"value":897},{"type":606,"tag":636,"props":7608,"children":7609},{"class":638,"line":3040},[7610],{"type":606,"tag":636,"props":7611,"children":7612},{"style":642},[7613],{"type":612,"value":1034},{"type":606,"tag":636,"props":7615,"children":7616},{"class":638,"line":3049},[7617],{"type":606,"tag":636,"props":7618,"children":7619},{"style":642},[7620],{"type":612,"value":7621},"            factor (Union[int, float]): Number to multiply each value by\n",{"type":606,"tag":636,"props":7623,"children":7624},{"class":638,"line":3058},[7625],{"type":606,"tag":636,"props":7626,"children":7627},{"style":642},[7628],{"type":612,"value":1050},{"type":606,"tag":636,"props":7630,"children":7631},{"class":638,"line":3067},[7632],{"type":606,"tag":636,"props":7633,"children":7634},{"style":642},[7635],{"type":612,"value":1886},{"type":606,"tag":636,"props":7637,"children":7638},{"class":638,"line":3075},[7639],{"type":606,"tag":636,"props":7640,"children":7641},{"style":642},[7642],{"type":612,"value":7256},{"type":606,"tag":636,"props":7644,"children":7645},{"class":638,"line":3084},[7646],{"type":606,"tag":636,"props":7647,"children":7648},{"style":642},[7649],{"type":612,"value":1050},{"type":606,"tag":636,"props":7651,"children":7652},{"class":638,"line":3093},[7653],{"type":606,"tag":636,"props":7654,"children":7655},{"style":642},[7656],{"type":612,"value":1382},{"type":606,"tag":636,"props":7658,"children":7659},{"class":638,"line":3101},[7660,7664],{"type":606,"tag":636,"props":7661,"children":7662},{"style":745},[7663],{"type":612,"value":1391},{"type":606,"tag":636,"props":7665,"children":7666},{"style":642},[7667],{"type":612,"value":7668},"processor = DataProcessor([1, 2, 3])\n",{"type":606,"tag":636,"props":7670,"children":7671},{"class":638,"line":3110},[7672,7676],{"type":606,"tag":636,"props":7673,"children":7674},{"style":745},[7675],{"type":612,"value":1391},{"type":606,"tag":636,"props":7677,"children":7678},{"style":642},[7679],{"type":612,"value":7680},"processor.multiply_by(2).get_data()\n",{"type":606,"tag":636,"props":7682,"children":7683},{"class":638,"line":3119},[7684],{"type":606,"tag":636,"props":7685,"children":7686},{"style":642},[7687],{"type":612,"value":7324},{"type":606,"tag":636,"props":7689,"children":7690},{"class":638,"line":3127},[7691],{"type":606,"tag":636,"props":7692,"children":7693},{"style":642},[7694],{"type":612,"value":1011},{"type":606,"tag":636,"props":7696,"children":7697},{"class":638,"line":3136},[7698,7702,7706,7710,7714,7718,7723,7727,7731,7735,7739],{"type":606,"tag":636,"props":7699,"children":7700},{"style":975},[7701],{"type":612,"value":1162},{"type":606,"tag":636,"props":7703,"children":7704},{"style":751},[7705],{"type":612,"value":7128},{"type":606,"tag":636,"props":7707,"children":7708},{"style":745},[7709],{"type":612,"value":1172},{"type":606,"tag":636,"props":7711,"children":7712},{"style":751},[7713],{"type":612,"value":7364},{"type":606,"tag":636,"props":7715,"children":7716},{"style":745},[7717],{"type":612,"value":2253},{"type":606,"tag":636,"props":7719,"children":7720},{"style":751},[7721],{"type":612,"value":7722}," factor ",{"type":606,"tag":636,"props":7724,"children":7725},{"style":745},[7726],{"type":612,"value":2270},{"type":606,"tag":636,"props":7728,"children":7729},{"style":751},[7730],{"type":612,"value":7373},{"type":606,"tag":636,"props":7732,"children":7733},{"style":745},[7734],{"type":612,"value":1564},{"type":606,"tag":636,"props":7736,"children":7737},{"style":975},[7738],{"type":612,"value":1569},{"type":606,"tag":636,"props":7740,"children":7741},{"style":751},[7742],{"type":612,"value":7743},".data]\n",{"type":606,"tag":636,"props":7745,"children":7746},{"class":638,"line":3145},[7747,7751,7755,7759],{"type":606,"tag":636,"props":7748,"children":7749},{"style":975},[7750],{"type":612,"value":1162},{"type":606,"tag":636,"props":7752,"children":7753},{"style":751},[7754],{"type":612,"value":7179},{"type":606,"tag":636,"props":7756,"children":7757},{"style":745},[7758],{"type":612,"value":1658},{"type":606,"tag":636,"props":7760,"children":7761},{"style":975},[7762],{"type":612,"value":7465},{"type":606,"tag":636,"props":7764,"children":7765},{"class":638,"line":3153},[7766,7770],{"type":606,"tag":636,"props":7767,"children":7768},{"style":745},[7769],{"type":612,"value":2082},{"type":606,"tag":636,"props":7771,"children":7772},{"style":975},[7773],{"type":612,"value":7478},{"type":606,"tag":636,"props":7775,"children":7776},{"class":638,"line":3161},[7777],{"type":606,"tag":636,"props":7778,"children":7779},{"style":751},[7780],{"type":612,"value":842},{"type":606,"tag":636,"props":7782,"children":7783},{"class":638,"line":3174},[7784,7788,7793],{"type":606,"tag":636,"props":7785,"children":7786},{"style":745},[7787],{"type":612,"value":972},{"type":606,"tag":636,"props":7789,"children":7790},{"style":810},[7791],{"type":612,"value":7792}," get_data",{"type":606,"tag":636,"props":7794,"children":7795},{"style":751},[7796],{"type":612,"value":7797},"(self) -> List:\n",{"type":606,"tag":636,"props":7799,"children":7800},{"class":638,"line":3183},[7801],{"type":606,"tag":636,"props":7802,"children":7803},{"style":642},[7804],{"type":612,"value":1011},{"type":606,"tag":636,"props":7806,"children":7807},{"class":638,"line":3196},[7808],{"type":606,"tag":636,"props":7809,"children":7810},{"style":642},[7811],{"type":612,"value":7812},"        Get the current processed data.\n",{"type":606,"tag":636,"props":7814,"children":7815},{"class":638,"line":3205},[7816],{"type":606,"tag":636,"props":7817,"children":7818},{"style":642},[7819],{"type":612,"value":897},{"type":606,"tag":636,"props":7821,"children":7822},{"class":638,"line":3213},[7823],{"type":606,"tag":636,"props":7824,"children":7825},{"style":642},[7826],{"type":612,"value":1886},{"type":606,"tag":636,"props":7828,"children":7829},{"class":638,"line":3256},[7830],{"type":606,"tag":636,"props":7831,"children":7832},{"style":642},[7833],{"type":612,"value":7834},"            List: A copy of the current data\n",{"type":606,"tag":636,"props":7836,"children":7837},{"class":638,"line":3282},[7838],{"type":606,"tag":636,"props":7839,"children":7840},{"style":642},[7841],{"type":612,"value":1050},{"type":606,"tag":636,"props":7843,"children":7844},{"class":638,"line":3290},[7845],{"type":606,"tag":636,"props":7846,"children":7847},{"style":642},[7848],{"type":612,"value":2632},{"type":606,"tag":636,"props":7850,"children":7851},{"class":638,"line":3299},[7852],{"type":606,"tag":636,"props":7853,"children":7854},{"style":642},[7855],{"type":612,"value":7856},"            Returns a copy to prevent external modification\n",{"type":606,"tag":636,"props":7858,"children":7859},{"class":638,"line":3324},[7860],{"type":606,"tag":636,"props":7861,"children":7862},{"style":642},[7863],{"type":612,"value":7864},"            of the internal data structure.\n",{"type":606,"tag":636,"props":7866,"children":7867},{"class":638,"line":3337},[7868],{"type":606,"tag":636,"props":7869,"children":7870},{"style":642},[7871],{"type":612,"value":1011},{"type":606,"tag":636,"props":7873,"children":7874},{"class":638,"line":3345},[7875,7879,7883],{"type":606,"tag":636,"props":7876,"children":7877},{"style":745},[7878],{"type":612,"value":2082},{"type":606,"tag":636,"props":7880,"children":7881},{"style":975},[7882],{"type":612,"value":1569},{"type":606,"tag":636,"props":7884,"children":7885},{"style":751},[7886],{"type":612,"value":7887},".data.copy()\n",{"type":606,"tag":636,"props":7889,"children":7890},{"class":638,"line":3354},[7891],{"type":606,"tag":636,"props":7892,"children":7893},{"style":751},[7894],{"type":612,"value":842},{"type":606,"tag":636,"props":7896,"children":7897},{"class":638,"line":3372},[7898,7902,7907,7911,7916],{"type":606,"tag":636,"props":7899,"children":7900},{"style":745},[7901],{"type":612,"value":972},{"type":606,"tag":636,"props":7903,"children":7904},{"style":810},[7905],{"type":612,"value":7906}," get_stats",{"type":606,"tag":636,"props":7908,"children":7909},{"style":751},[7910],{"type":612,"value":2113},{"type":606,"tag":636,"props":7912,"children":7913},{"style":975},[7914],{"type":612,"value":7915},"dict",{"type":606,"tag":636,"props":7917,"children":7918},{"style":751},[7919],{"type":612,"value":818},{"type":606,"tag":636,"props":7921,"children":7922},{"class":638,"line":3403},[7923],{"type":606,"tag":636,"props":7924,"children":7925},{"style":642},[7926],{"type":612,"value":1011},{"type":606,"tag":636,"props":7928,"children":7929},{"class":638,"line":3434},[7930],{"type":606,"tag":636,"props":7931,"children":7932},{"style":642},[7933],{"type":612,"value":7934},"        Get basic statistics about the current data.\n",{"type":606,"tag":636,"props":7936,"children":7937},{"class":638,"line":3442},[7938],{"type":606,"tag":636,"props":7939,"children":7940},{"style":642},[7941],{"type":612,"value":897},{"type":606,"tag":636,"props":7943,"children":7944},{"class":638,"line":3479},[7945],{"type":606,"tag":636,"props":7946,"children":7947},{"style":642},[7948],{"type":612,"value":1886},{"type":606,"tag":636,"props":7950,"children":7951},{"class":638,"line":3505},[7952],{"type":606,"tag":636,"props":7953,"children":7954},{"style":642},[7955],{"type":612,"value":7956},"            dict: Statistics including count, sum, min, max, and average\n",{"type":606,"tag":636,"props":7958,"children":7959},{"class":638,"line":3513},[7960],{"type":606,"tag":636,"props":7961,"children":7962},{"style":642},[7963],{"type":612,"value":1050},{"type":606,"tag":636,"props":7965,"children":7966},{"class":638,"line":3521},[7967],{"type":606,"tag":636,"props":7968,"children":7969},{"style":642},[7970],{"type":612,"value":1382},{"type":606,"tag":636,"props":7972,"children":7973},{"class":638,"line":3555},[7974,7978],{"type":606,"tag":636,"props":7975,"children":7976},{"style":745},[7977],{"type":612,"value":1391},{"type":606,"tag":636,"props":7979,"children":7980},{"style":642},[7981],{"type":612,"value":6997},{"type":606,"tag":636,"props":7983,"children":7984},{"class":638,"line":3563},[7985,7989],{"type":606,"tag":636,"props":7986,"children":7987},{"style":745},[7988],{"type":612,"value":1391},{"type":606,"tag":636,"props":7990,"children":7991},{"style":642},[7992],{"type":612,"value":7993},"stats = processor.get_stats()\n",{"type":606,"tag":636,"props":7995,"children":7996},{"class":638,"line":3572},[7997,8001],{"type":606,"tag":636,"props":7998,"children":7999},{"style":745},[8000],{"type":612,"value":1391},{"type":606,"tag":636,"props":8002,"children":8003},{"style":642},[8004],{"type":612,"value":8005},"stats['average']\n",{"type":606,"tag":636,"props":8007,"children":8008},{"class":638,"line":3580},[8009],{"type":606,"tag":636,"props":8010,"children":8011},{"style":642},[8012],{"type":612,"value":8013},"            3.0\n",{"type":606,"tag":636,"props":8015,"children":8016},{"class":638,"line":3588},[8017],{"type":606,"tag":636,"props":8018,"children":8019},{"style":642},[8020],{"type":612,"value":1011},{"type":606,"tag":636,"props":8022,"children":8023},{"class":638,"line":3597},[8024,8028,8032,8036],{"type":606,"tag":636,"props":8025,"children":8026},{"style":745},[8027],{"type":612,"value":1081},{"type":606,"tag":636,"props":8029,"children":8030},{"style":745},[8031],{"type":612,"value":5612},{"type":606,"tag":636,"props":8033,"children":8034},{"style":975},[8035],{"type":612,"value":1569},{"type":606,"tag":636,"props":8037,"children":8038},{"style":751},[8039],{"type":612,"value":8040},".data:\n",{"type":606,"tag":636,"props":8042,"children":8043},{"class":638,"line":3606},[8044,8048],{"type":606,"tag":636,"props":8045,"children":8046},{"style":745},[8047],{"type":612,"value":7473},{"type":606,"tag":636,"props":8049,"children":8050},{"style":751},[8051],{"type":612,"value":1707},{"type":606,"tag":636,"props":8053,"children":8054},{"class":638,"line":3614},[8055,8060,8064,8068],{"type":606,"tag":636,"props":8056,"children":8057},{"style":642},[8058],{"type":612,"value":8059},"                'count'",{"type":606,"tag":636,"props":8061,"children":8062},{"style":751},[8063],{"type":612,"value":6087},{"type":606,"tag":636,"props":8065,"children":8066},{"style":975},[8067],{"type":612,"value":6807},{"type":606,"tag":636,"props":8069,"children":8070},{"style":751},[8071],{"type":612,"value":3822},{"type":606,"tag":636,"props":8073,"children":8074},{"class":638,"line":3622},[8075,8080,8084,8088],{"type":606,"tag":636,"props":8076,"children":8077},{"style":642},[8078],{"type":612,"value":8079},"                'sum'",{"type":606,"tag":636,"props":8081,"children":8082},{"style":751},[8083],{"type":612,"value":6087},{"type":606,"tag":636,"props":8085,"children":8086},{"style":975},[8087],{"type":612,"value":6807},{"type":606,"tag":636,"props":8089,"children":8090},{"style":751},[8091],{"type":612,"value":3822},{"type":606,"tag":636,"props":8093,"children":8094},{"class":638,"line":3631},[8095,8100,8104,8108],{"type":606,"tag":636,"props":8096,"children":8097},{"style":642},[8098],{"type":612,"value":8099},"                'min'",{"type":606,"tag":636,"props":8101,"children":8102},{"style":751},[8103],{"type":612,"value":6087},{"type":606,"tag":636,"props":8105,"children":8106},{"style":975},[8107],{"type":612,"value":1286},{"type":606,"tag":636,"props":8109,"children":8110},{"style":751},[8111],{"type":612,"value":3822},{"type":606,"tag":636,"props":8113,"children":8114},{"class":638,"line":3639},[8115,8120,8124,8128],{"type":606,"tag":636,"props":8116,"children":8117},{"style":642},[8118],{"type":612,"value":8119},"                'max'",{"type":606,"tag":636,"props":8121,"children":8122},{"style":751},[8123],{"type":612,"value":6087},{"type":606,"tag":636,"props":8125,"children":8126},{"style":975},[8127],{"type":612,"value":1286},{"type":606,"tag":636,"props":8129,"children":8130},{"style":751},[8131],{"type":612,"value":3822},{"type":606,"tag":636,"props":8133,"children":8134},{"class":638,"line":3647},[8135,8140,8144],{"type":606,"tag":636,"props":8136,"children":8137},{"style":642},[8138],{"type":612,"value":8139},"                'average'",{"type":606,"tag":636,"props":8141,"children":8142},{"style":751},[8143],{"type":612,"value":6087},{"type":606,"tag":636,"props":8145,"children":8146},{"style":975},[8147],{"type":612,"value":8148},"None\n",{"type":606,"tag":636,"props":8150,"children":8151},{"class":638,"line":3659},[8152],{"type":606,"tag":636,"props":8153,"children":8154},{"style":751},[8155],{"type":612,"value":8156},"            }\n",{"type":606,"tag":636,"props":8158,"children":8159},{"class":638,"line":3672},[8160],{"type":606,"tag":636,"props":8161,"children":8162},{"style":751},[8163],{"type":612,"value":897},{"type":606,"tag":636,"props":8165,"children":8166},{"class":638,"line":3685},[8167,8171],{"type":606,"tag":636,"props":8168,"children":8169},{"style":745},[8170],{"type":612,"value":2082},{"type":606,"tag":636,"props":8172,"children":8173},{"style":751},[8174],{"type":612,"value":1707},{"type":606,"tag":636,"props":8176,"children":8177},{"class":638,"line":3698},[8178,8183,8187,8191,8195,8199],{"type":606,"tag":636,"props":8179,"children":8180},{"style":642},[8181],{"type":612,"value":8182},"            'count'",{"type":606,"tag":636,"props":8184,"children":8185},{"style":751},[8186],{"type":612,"value":6087},{"type":606,"tag":636,"props":8188,"children":8189},{"style":975},[8190],{"type":612,"value":3846},{"type":606,"tag":636,"props":8192,"children":8193},{"style":751},[8194],{"type":612,"value":1137},{"type":606,"tag":636,"props":8196,"children":8197},{"style":975},[8198],{"type":612,"value":2007},{"type":606,"tag":636,"props":8200,"children":8201},{"style":751},[8202],{"type":612,"value":8203},".data),\n",{"type":606,"tag":636,"props":8205,"children":8206},{"class":638,"line":3707},[8207,8212,8216,8221,8225,8229],{"type":606,"tag":636,"props":8208,"children":8209},{"style":642},[8210],{"type":612,"value":8211},"            'sum'",{"type":606,"tag":636,"props":8213,"children":8214},{"style":751},[8215],{"type":612,"value":6087},{"type":606,"tag":636,"props":8217,"children":8218},{"style":975},[8219],{"type":612,"value":8220},"sum",{"type":606,"tag":636,"props":8222,"children":8223},{"style":751},[8224],{"type":612,"value":1137},{"type":606,"tag":636,"props":8226,"children":8227},{"style":975},[8228],{"type":612,"value":2007},{"type":606,"tag":636,"props":8230,"children":8231},{"style":751},[8232],{"type":612,"value":8203},{"type":606,"tag":636,"props":8234,"children":8235},{"class":638,"line":3716},[8236,8241,8245,8250,8254,8258],{"type":606,"tag":636,"props":8237,"children":8238},{"style":642},[8239],{"type":612,"value":8240},"            'min'",{"type":606,"tag":636,"props":8242,"children":8243},{"style":751},[8244],{"type":612,"value":6087},{"type":606,"tag":636,"props":8246,"children":8247},{"style":975},[8248],{"type":612,"value":8249},"min",{"type":606,"tag":636,"props":8251,"children":8252},{"style":751},[8253],{"type":612,"value":1137},{"type":606,"tag":636,"props":8255,"children":8256},{"style":975},[8257],{"type":612,"value":2007},{"type":606,"tag":636,"props":8259,"children":8260},{"style":751},[8261],{"type":612,"value":8203},{"type":606,"tag":636,"props":8263,"children":8264},{"class":638,"line":3725},[8265,8270,8274,8279,8283,8287],{"type":606,"tag":636,"props":8266,"children":8267},{"style":642},[8268],{"type":612,"value":8269},"            'max'",{"type":606,"tag":636,"props":8271,"children":8272},{"style":751},[8273],{"type":612,"value":6087},{"type":606,"tag":636,"props":8275,"children":8276},{"style":975},[8277],{"type":612,"value":8278},"max",{"type":606,"tag":636,"props":8280,"children":8281},{"style":751},[8282],{"type":612,"value":1137},{"type":606,"tag":636,"props":8284,"children":8285},{"style":975},[8286],{"type":612,"value":2007},{"type":606,"tag":636,"props":8288,"children":8289},{"style":751},[8290],{"type":612,"value":8203},{"type":606,"tag":636,"props":8292,"children":8293},{"class":638,"line":3733},[8294,8299,8303,8307,8311,8315,8320,8325,8329,8333,8337],{"type":606,"tag":636,"props":8295,"children":8296},{"style":642},[8297],{"type":612,"value":8298},"            'average'",{"type":606,"tag":636,"props":8300,"children":8301},{"style":751},[8302],{"type":612,"value":6087},{"type":606,"tag":636,"props":8304,"children":8305},{"style":975},[8306],{"type":612,"value":8220},{"type":606,"tag":636,"props":8308,"children":8309},{"style":751},[8310],{"type":612,"value":1137},{"type":606,"tag":636,"props":8312,"children":8313},{"style":975},[8314],{"type":612,"value":2007},{"type":606,"tag":636,"props":8316,"children":8317},{"style":751},[8318],{"type":612,"value":8319},".data) ",{"type":606,"tag":636,"props":8321,"children":8322},{"style":745},[8323],{"type":612,"value":8324},"/",{"type":606,"tag":636,"props":8326,"children":8327},{"style":975},[8328],{"type":612,"value":2798},{"type":606,"tag":636,"props":8330,"children":8331},{"style":751},[8332],{"type":612,"value":1137},{"type":606,"tag":636,"props":8334,"children":8335},{"style":975},[8336],{"type":612,"value":2007},{"type":606,"tag":636,"props":8338,"children":8339},{"style":751},[8340],{"type":612,"value":8341},".data)\n",{"type":606,"tag":636,"props":8343,"children":8344},{"class":638,"line":3742},[8345],{"type":606,"tag":636,"props":8346,"children":8347},{"style":751},[8348],{"type":612,"value":1772},{"type":606,"tag":636,"props":8350,"children":8351},{"class":638,"line":3751},[8352],{"type":606,"tag":636,"props":8353,"children":8354},{"emptyLinePlaceholder":13},[8355],{"type":612,"value":661},{"type":606,"tag":636,"props":8357,"children":8358},{"class":638,"line":3759},[8359],{"type":606,"tag":636,"props":8360,"children":8361},{"emptyLinePlaceholder":13},[8362],{"type":612,"value":661},{"type":606,"tag":636,"props":8364,"children":8365},{"class":638,"line":3768},[8366,8370,8375],{"type":606,"tag":636,"props":8367,"children":8368},{"style":745},[8369],{"type":612,"value":2951},{"type":606,"tag":636,"props":8371,"children":8372},{"style":810},[8373],{"type":612,"value":8374}," demonstrate_utilities",{"type":606,"tag":636,"props":8376,"children":8377},{"style":751},[8378],{"type":612,"value":4274},{"type":606,"tag":636,"props":8380,"children":8381},{"class":638,"line":3786},[8382],{"type":606,"tag":636,"props":8383,"children":8384},{"style":642},[8385],{"type":612,"value":826},{"type":606,"tag":636,"props":8387,"children":8388},{"class":638,"line":3825},[8389],{"type":606,"tag":636,"props":8390,"children":8391},{"style":642},[8392],{"type":612,"value":8393},"    Demonstrate the utility functions and classes.\n",{"type":606,"tag":636,"props":8395,"children":8396},{"class":638,"line":3873},[8397],{"type":606,"tag":636,"props":8398,"children":8399},{"style":642},[8400],{"type":612,"value":842},{"type":606,"tag":636,"props":8402,"children":8403},{"class":638,"line":3882},[8404],{"type":606,"tag":636,"props":8405,"children":8406},{"style":642},[8407],{"type":612,"value":8408},"    This function shows practical examples of how to use\n",{"type":606,"tag":636,"props":8410,"children":8411},{"class":638,"line":3891},[8412],{"type":606,"tag":636,"props":8413,"children":8414},{"style":642},[8415],{"type":612,"value":8416},"    the utilities provided in this module.\n",{"type":606,"tag":636,"props":8418,"children":8419},{"class":638,"line":3899},[8420],{"type":606,"tag":636,"props":8421,"children":8422},{"style":642},[8423],{"type":612,"value":826},{"type":606,"tag":636,"props":8425,"children":8426},{"class":638,"line":3908},[8427,8431,8435,8440],{"type":606,"tag":636,"props":8428,"children":8429},{"style":975},[8430],{"type":612,"value":4334},{"type":606,"tag":636,"props":8432,"children":8433},{"style":751},[8434],{"type":612,"value":1137},{"type":606,"tag":636,"props":8436,"children":8437},{"style":642},[8438],{"type":612,"value":8439},"\"Utility Functions Demo\"",{"type":606,"tag":636,"props":8441,"children":8442},{"style":751},[8443],{"type":612,"value":1147},{"type":606,"tag":636,"props":8445,"children":8446},{"class":638,"line":3930},[8447,8451,8455,8459,8463,8468],{"type":606,"tag":636,"props":8448,"children":8449},{"style":975},[8450],{"type":612,"value":4334},{"type":606,"tag":636,"props":8452,"children":8453},{"style":751},[8454],{"type":612,"value":1137},{"type":606,"tag":636,"props":8456,"children":8457},{"style":642},[8458],{"type":612,"value":4364},{"type":606,"tag":636,"props":8460,"children":8461},{"style":745},[8462],{"type":612,"value":3836},{"type":606,"tag":636,"props":8464,"children":8465},{"style":975},[8466],{"type":612,"value":8467}," 30",{"type":606,"tag":636,"props":8469,"children":8470},{"style":751},[8471],{"type":612,"value":1147},{"type":606,"tag":636,"props":8473,"children":8474},{"class":638,"line":3972},[8475],{"type":606,"tag":636,"props":8476,"children":8477},{"style":751},[8478],{"type":612,"value":842},{"type":606,"tag":636,"props":8480,"children":8481},{"class":638,"line":4070},[8482],{"type":606,"tag":636,"props":8483,"children":8484},{"style":1542},[8485],{"type":612,"value":8486},"    # Email validation examples\n",{"type":606,"tag":636,"props":8488,"children":8489},{"class":638,"line":4079},[8490,8495,8499,8504,8509,8513,8518,8522,8527],{"type":606,"tag":636,"props":8491,"children":8492},{"style":751},[8493],{"type":612,"value":8494},"    emails ",{"type":606,"tag":636,"props":8496,"children":8497},{"style":745},[8498],{"type":612,"value":1172},{"type":606,"tag":636,"props":8500,"children":8501},{"style":751},[8502],{"type":612,"value":8503}," [",{"type":606,"tag":636,"props":8505,"children":8506},{"style":642},[8507],{"type":612,"value":8508},"\"user@example.com\"",{"type":606,"tag":636,"props":8510,"children":8511},{"style":751},[8512],{"type":612,"value":4467},{"type":606,"tag":636,"props":8514,"children":8515},{"style":642},[8516],{"type":612,"value":8517},"\"invalid-email\"",{"type":606,"tag":636,"props":8519,"children":8520},{"style":751},[8521],{"type":612,"value":4467},{"type":606,"tag":636,"props":8523,"children":8524},{"style":642},[8525],{"type":612,"value":8526},"\"test@domain.co.uk\"",{"type":606,"tag":636,"props":8528,"children":8529},{"style":751},[8530],{"type":612,"value":3969},{"type":606,"tag":636,"props":8532,"children":8533},{"class":638,"line":4087},[8534,8538,8542,8547],{"type":606,"tag":636,"props":8535,"children":8536},{"style":975},[8537],{"type":612,"value":4334},{"type":606,"tag":636,"props":8539,"children":8540},{"style":751},[8541],{"type":612,"value":1137},{"type":606,"tag":636,"props":8543,"children":8544},{"style":642},[8545],{"type":612,"value":8546},"\"Email Validation:\"",{"type":606,"tag":636,"props":8548,"children":8549},{"style":751},[8550],{"type":612,"value":1147},{"type":606,"tag":636,"props":8552,"children":8553},{"class":638,"line":4096},[8554,8558,8562,8566],{"type":606,"tag":636,"props":8555,"children":8556},{"style":745},[8557],{"type":612,"value":3914},{"type":606,"tag":636,"props":8559,"children":8560},{"style":751},[8561],{"type":612,"value":5617},{"type":606,"tag":636,"props":8563,"children":8564},{"style":745},[8565],{"type":612,"value":1564},{"type":606,"tag":636,"props":8567,"children":8568},{"style":751},[8569],{"type":612,"value":8570}," emails:\n",{"type":606,"tag":636,"props":8572,"children":8573},{"class":638,"line":4105},[8574,8579,8583],{"type":606,"tag":636,"props":8575,"children":8576},{"style":751},[8577],{"type":612,"value":8578},"        is_valid ",{"type":606,"tag":636,"props":8580,"children":8581},{"style":745},[8582],{"type":612,"value":1172},{"type":606,"tag":636,"props":8584,"children":8585},{"style":751},[8586],{"type":612,"value":8587}," validate_email(email)\n",{"type":606,"tag":636,"props":8589,"children":8590},{"class":638,"line":4118},[8591,8596,8600,8605,8610,8615,8620],{"type":606,"tag":636,"props":8592,"children":8593},{"style":751},[8594],{"type":612,"value":8595},"        status ",{"type":606,"tag":636,"props":8597,"children":8598},{"style":745},[8599],{"type":612,"value":1172},{"type":606,"tag":636,"props":8601,"children":8602},{"style":642},[8603],{"type":612,"value":8604}," \"✓ Valid\"",{"type":606,"tag":636,"props":8606,"children":8607},{"style":745},[8608],{"type":612,"value":8609}," if",{"type":606,"tag":636,"props":8611,"children":8612},{"style":751},[8613],{"type":612,"value":8614}," is_valid ",{"type":606,"tag":636,"props":8616,"children":8617},{"style":745},[8618],{"type":612,"value":8619},"else",{"type":606,"tag":636,"props":8621,"children":8622},{"style":642},[8623],{"type":612,"value":8624}," \"✗ Invalid\"\n",{"type":606,"tag":636,"props":8626,"children":8627},{"class":638,"line":4156},[8628,8632,8636,8640,8645,8649,8654,8658,8662,8666,8671,8675,8679],{"type":606,"tag":636,"props":8629,"children":8630},{"style":975},[8631],{"type":612,"value":4997},{"type":606,"tag":636,"props":8633,"children":8634},{"style":751},[8635],{"type":612,"value":1137},{"type":606,"tag":636,"props":8637,"children":8638},{"style":745},[8639],{"type":612,"value":4588},{"type":606,"tag":636,"props":8641,"children":8642},{"style":642},[8643],{"type":612,"value":8644},"\"  ",{"type":606,"tag":636,"props":8646,"children":8647},{"style":975},[8648],{"type":612,"value":3802},{"type":606,"tag":636,"props":8650,"children":8651},{"style":751},[8652],{"type":612,"value":8653},"email",{"type":606,"tag":636,"props":8655,"children":8656},{"style":975},[8657],{"type":612,"value":3812},{"type":606,"tag":636,"props":8659,"children":8660},{"style":642},[8661],{"type":612,"value":6087},{"type":606,"tag":636,"props":8663,"children":8664},{"style":975},[8665],{"type":612,"value":3802},{"type":606,"tag":636,"props":8667,"children":8668},{"style":751},[8669],{"type":612,"value":8670},"status",{"type":606,"tag":636,"props":8672,"children":8673},{"style":975},[8674],{"type":612,"value":3812},{"type":606,"tag":636,"props":8676,"children":8677},{"style":642},[8678],{"type":612,"value":3817},{"type":606,"tag":636,"props":8680,"children":8681},{"style":751},[8682],{"type":612,"value":1147},{"type":606,"tag":636,"props":8684,"children":8685},{"class":638,"line":4190},[8686],{"type":606,"tag":636,"props":8687,"children":8688},{"style":751},[8689],{"type":612,"value":842},{"type":606,"tag":636,"props":8691,"children":8692},{"class":638,"line":4199},[8693],{"type":606,"tag":636,"props":8694,"children":8695},{"style":1542},[8696],{"type":612,"value":8697},"    # Currency formatting examples\n",{"type":606,"tag":636,"props":8699,"children":8700},{"class":638,"line":4207},[8701,8706,8710,8714,8719,8723,8728,8732,8736,8740,8745],{"type":606,"tag":636,"props":8702,"children":8703},{"style":751},[8704],{"type":612,"value":8705},"    amounts ",{"type":606,"tag":636,"props":8707,"children":8708},{"style":745},[8709],{"type":612,"value":1172},{"type":606,"tag":636,"props":8711,"children":8712},{"style":751},[8713],{"type":612,"value":8503},{"type":606,"tag":636,"props":8715,"children":8716},{"style":975},[8717],{"type":612,"value":8718},"19.99",{"type":606,"tag":636,"props":8720,"children":8721},{"style":751},[8722],{"type":612,"value":4467},{"type":606,"tag":636,"props":8724,"children":8725},{"style":975},[8726],{"type":612,"value":8727},"1000.50",{"type":606,"tag":636,"props":8729,"children":8730},{"style":751},[8731],{"type":612,"value":4467},{"type":606,"tag":636,"props":8733,"children":8734},{"style":975},[8735],{"type":612,"value":6807},{"type":606,"tag":636,"props":8737,"children":8738},{"style":751},[8739],{"type":612,"value":4467},{"type":606,"tag":636,"props":8741,"children":8742},{"style":975},[8743],{"type":612,"value":8744},"1234567.89",{"type":606,"tag":636,"props":8746,"children":8747},{"style":751},[8748],{"type":612,"value":3969},{"type":606,"tag":636,"props":8750,"children":8751},{"class":638,"line":4234},[8752,8756,8760,8764,8768,8773],{"type":606,"tag":636,"props":8753,"children":8754},{"style":975},[8755],{"type":612,"value":4334},{"type":606,"tag":636,"props":8757,"children":8758},{"style":751},[8759],{"type":612,"value":1137},{"type":606,"tag":636,"props":8761,"children":8762},{"style":642},[8763],{"type":612,"value":3817},{"type":606,"tag":636,"props":8765,"children":8766},{"style":975},[8767],{"type":612,"value":4222},{"type":606,"tag":636,"props":8769,"children":8770},{"style":642},[8771],{"type":612,"value":8772},"Currency Formatting:\"",{"type":606,"tag":636,"props":8774,"children":8775},{"style":751},[8776],{"type":612,"value":1147},{"type":606,"tag":636,"props":8778,"children":8779},{"class":638,"line":4242},[8780,8784,8788,8792],{"type":606,"tag":636,"props":8781,"children":8782},{"style":745},[8783],{"type":612,"value":3914},{"type":606,"tag":636,"props":8785,"children":8786},{"style":751},[8787],{"type":612,"value":6007},{"type":606,"tag":636,"props":8789,"children":8790},{"style":745},[8791],{"type":612,"value":1564},{"type":606,"tag":636,"props":8793,"children":8794},{"style":751},[8795],{"type":612,"value":8796}," amounts:\n",{"type":606,"tag":636,"props":8798,"children":8799},{"class":638,"line":4250},[8800,8805,8809],{"type":606,"tag":636,"props":8801,"children":8802},{"style":751},[8803],{"type":612,"value":8804},"        formatted ",{"type":606,"tag":636,"props":8806,"children":8807},{"style":745},[8808],{"type":612,"value":1172},{"type":606,"tag":636,"props":8810,"children":8811},{"style":751},[8812],{"type":612,"value":8813}," format_currency(amount)\n",{"type":606,"tag":636,"props":8815,"children":8816},{"class":638,"line":4259},[8817,8821,8825,8829,8834,8838,8842,8846,8851,8855,8860,8864,8868],{"type":606,"tag":636,"props":8818,"children":8819},{"style":975},[8820],{"type":612,"value":4997},{"type":606,"tag":636,"props":8822,"children":8823},{"style":751},[8824],{"type":612,"value":1137},{"type":606,"tag":636,"props":8826,"children":8827},{"style":745},[8828],{"type":612,"value":4588},{"type":606,"tag":636,"props":8830,"children":8831},{"style":642},[8832],{"type":612,"value":8833},"\"  $",{"type":606,"tag":636,"props":8835,"children":8836},{"style":975},[8837],{"type":612,"value":3802},{"type":606,"tag":636,"props":8839,"children":8840},{"style":751},[8841],{"type":612,"value":6341},{"type":606,"tag":636,"props":8843,"children":8844},{"style":975},[8845],{"type":612,"value":3812},{"type":606,"tag":636,"props":8847,"children":8848},{"style":642},[8849],{"type":612,"value":8850}," → ",{"type":606,"tag":636,"props":8852,"children":8853},{"style":975},[8854],{"type":612,"value":3802},{"type":606,"tag":636,"props":8856,"children":8857},{"style":751},[8858],{"type":612,"value":8859},"formatted",{"type":606,"tag":636,"props":8861,"children":8862},{"style":975},[8863],{"type":612,"value":3812},{"type":606,"tag":636,"props":8865,"children":8866},{"style":642},[8867],{"type":612,"value":3817},{"type":606,"tag":636,"props":8869,"children":8870},{"style":751},[8871],{"type":612,"value":1147},{"type":606,"tag":636,"props":8873,"children":8874},{"class":638,"line":4277},[8875],{"type":606,"tag":636,"props":8876,"children":8877},{"style":751},[8878],{"type":612,"value":842},{"type":606,"tag":636,"props":8880,"children":8881},{"class":638,"line":4285},[8882],{"type":606,"tag":636,"props":8883,"children":8884},{"style":1542},[8885],{"type":612,"value":8886},"    # List chunking example\n",{"type":606,"tag":636,"props":8888,"children":8889},{"class":638,"line":4294},[8890,8895,8899,8904,8908,8913,8917,8921,8925,8930,8935],{"type":606,"tag":636,"props":8891,"children":8892},{"style":751},[8893],{"type":612,"value":8894},"    numbers ",{"type":606,"tag":636,"props":8896,"children":8897},{"style":745},[8898],{"type":612,"value":1172},{"type":606,"tag":636,"props":8900,"children":8901},{"style":975},[8902],{"type":612,"value":8903}," list",{"type":606,"tag":636,"props":8905,"children":8906},{"style":751},[8907],{"type":612,"value":1137},{"type":606,"tag":636,"props":8909,"children":8910},{"style":975},[8911],{"type":612,"value":8912},"range",{"type":606,"tag":636,"props":8914,"children":8915},{"style":751},[8916],{"type":612,"value":1137},{"type":606,"tag":636,"props":8918,"children":8919},{"style":975},[8920],{"type":612,"value":4481},{"type":606,"tag":636,"props":8922,"children":8923},{"style":751},[8924],{"type":612,"value":4467},{"type":606,"tag":636,"props":8926,"children":8927},{"style":975},[8928],{"type":612,"value":8929},"11",{"type":606,"tag":636,"props":8931,"children":8932},{"style":751},[8933],{"type":612,"value":8934},"))  ",{"type":606,"tag":636,"props":8936,"children":8937},{"style":1542},[8938],{"type":612,"value":8939},"# [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n",{"type":606,"tag":636,"props":8941,"children":8942},{"class":638,"line":4302},[8943,8947,8951,8956,8960],{"type":606,"tag":636,"props":8944,"children":8945},{"style":751},[8946],{"type":612,"value":6769},{"type":606,"tag":636,"props":8948,"children":8949},{"style":745},[8950],{"type":612,"value":1172},{"type":606,"tag":636,"props":8952,"children":8953},{"style":751},[8954],{"type":612,"value":8955}," chunk_list(numbers, ",{"type":606,"tag":636,"props":8957,"children":8958},{"style":975},[8959],{"type":612,"value":4550},{"type":606,"tag":636,"props":8961,"children":8962},{"style":751},[8963],{"type":612,"value":1147},{"type":606,"tag":636,"props":8965,"children":8966},{"class":638,"line":4311},[8967,8971,8975,8979,8983,8987,8992,8996,9001,9005,9010],{"type":606,"tag":636,"props":8968,"children":8969},{"style":975},[8970],{"type":612,"value":4334},{"type":606,"tag":636,"props":8972,"children":8973},{"style":751},[8974],{"type":612,"value":1137},{"type":606,"tag":636,"props":8976,"children":8977},{"style":745},[8978],{"type":612,"value":4588},{"type":606,"tag":636,"props":8980,"children":8981},{"style":642},[8982],{"type":612,"value":3817},{"type":606,"tag":636,"props":8984,"children":8985},{"style":975},[8986],{"type":612,"value":4222},{"type":606,"tag":636,"props":8988,"children":8989},{"style":642},[8990],{"type":612,"value":8991},"Chunking ",{"type":606,"tag":636,"props":8993,"children":8994},{"style":975},[8995],{"type":612,"value":3802},{"type":606,"tag":636,"props":8997,"children":8998},{"style":751},[8999],{"type":612,"value":9000},"numbers",{"type":606,"tag":636,"props":9002,"children":9003},{"style":975},[9004],{"type":612,"value":3812},{"type":606,"tag":636,"props":9006,"children":9007},{"style":642},[9008],{"type":612,"value":9009}," into groups of 3:\"",{"type":606,"tag":636,"props":9011,"children":9012},{"style":751},[9013],{"type":612,"value":1147},{"type":606,"tag":636,"props":9015,"children":9016},{"class":638,"line":4320},[9017,9021,9026,9030,9034],{"type":606,"tag":636,"props":9018,"children":9019},{"style":745},[9020],{"type":612,"value":3914},{"type":606,"tag":636,"props":9022,"children":9023},{"style":751},[9024],{"type":612,"value":9025}," i, chunk ",{"type":606,"tag":636,"props":9027,"children":9028},{"style":745},[9029],{"type":612,"value":1564},{"type":606,"tag":636,"props":9031,"children":9032},{"style":975},[9033],{"type":612,"value":1998},{"type":606,"tag":636,"props":9035,"children":9036},{"style":751},[9037],{"type":612,"value":9038},"(chunks):\n",{"type":606,"tag":636,"props":9040,"children":9041},{"class":638,"line":4328},[9042,9046,9050,9054,9059,9063,9068,9072,9077,9081,9085,9090,9094,9098],{"type":606,"tag":636,"props":9043,"children":9044},{"style":975},[9045],{"type":612,"value":4997},{"type":606,"tag":636,"props":9047,"children":9048},{"style":751},[9049],{"type":612,"value":1137},{"type":606,"tag":636,"props":9051,"children":9052},{"style":745},[9053],{"type":612,"value":4588},{"type":606,"tag":636,"props":9055,"children":9056},{"style":642},[9057],{"type":612,"value":9058},"\"  Chunk ",{"type":606,"tag":636,"props":9060,"children":9061},{"style":975},[9062],{"type":612,"value":3802},{"type":606,"tag":636,"props":9064,"children":9065},{"style":751},[9066],{"type":612,"value":9067},"i",{"type":606,"tag":636,"props":9069,"children":9070},{"style":745},[9071],{"type":612,"value":3462},{"type":606,"tag":636,"props":9073,"children":9074},{"style":975},[9075],{"type":612,"value":9076},"1}",{"type":606,"tag":636,"props":9078,"children":9079},{"style":642},[9080],{"type":612,"value":6087},{"type":606,"tag":636,"props":9082,"children":9083},{"style":975},[9084],{"type":612,"value":3802},{"type":606,"tag":636,"props":9086,"children":9087},{"style":751},[9088],{"type":612,"value":9089},"chunk",{"type":606,"tag":636,"props":9091,"children":9092},{"style":975},[9093],{"type":612,"value":3812},{"type":606,"tag":636,"props":9095,"children":9096},{"style":642},[9097],{"type":612,"value":3817},{"type":606,"tag":636,"props":9099,"children":9100},{"style":751},[9101],{"type":612,"value":1147},{"type":606,"tag":636,"props":9103,"children":9104},{"class":638,"line":4350},[9105],{"type":606,"tag":636,"props":9106,"children":9107},{"style":751},[9108],{"type":612,"value":842},{"type":606,"tag":636,"props":9110,"children":9111},{"class":638,"line":4380},[9112],{"type":606,"tag":636,"props":9113,"children":9114},{"style":1542},[9115],{"type":612,"value":9116},"    # Data processor example\n",{"type":606,"tag":636,"props":9118,"children":9119},{"class":638,"line":4388},[9120,9124,9128,9132,9136,9141],{"type":606,"tag":636,"props":9121,"children":9122},{"style":975},[9123],{"type":612,"value":4334},{"type":606,"tag":636,"props":9125,"children":9126},{"style":751},[9127],{"type":612,"value":1137},{"type":606,"tag":636,"props":9129,"children":9130},{"style":642},[9131],{"type":612,"value":3817},{"type":606,"tag":636,"props":9133,"children":9134},{"style":975},[9135],{"type":612,"value":4222},{"type":606,"tag":636,"props":9137,"children":9138},{"style":642},[9139],{"type":612,"value":9140},"Data Processing:\"",{"type":606,"tag":636,"props":9142,"children":9143},{"style":751},[9144],{"type":612,"value":1147},{"type":606,"tag":636,"props":9146,"children":9147},{"class":638,"line":4397},[9148,9153,9157,9162,9166,9170,9174,9178,9182,9186,9191,9195,9200,9204,9209,9213,9218,9222,9227,9231,9236,9240,9245],{"type":606,"tag":636,"props":9149,"children":9150},{"style":751},[9151],{"type":612,"value":9152},"    processor ",{"type":606,"tag":636,"props":9154,"children":9155},{"style":745},[9156],{"type":612,"value":1172},{"type":606,"tag":636,"props":9158,"children":9159},{"style":751},[9160],{"type":612,"value":9161}," DataProcessor([",{"type":606,"tag":636,"props":9163,"children":9164},{"style":975},[9165],{"type":612,"value":4481},{"type":606,"tag":636,"props":9167,"children":9168},{"style":751},[9169],{"type":612,"value":4467},{"type":606,"tag":636,"props":9171,"children":9172},{"style":975},[9173],{"type":612,"value":2536},{"type":606,"tag":636,"props":9175,"children":9176},{"style":751},[9177],{"type":612,"value":4467},{"type":606,"tag":636,"props":9179,"children":9180},{"style":975},[9181],{"type":612,"value":4550},{"type":606,"tag":636,"props":9183,"children":9184},{"style":751},[9185],{"type":612,"value":4467},{"type":606,"tag":636,"props":9187,"children":9188},{"style":975},[9189],{"type":612,"value":9190},"4",{"type":606,"tag":636,"props":9192,"children":9193},{"style":751},[9194],{"type":612,"value":4467},{"type":606,"tag":636,"props":9196,"children":9197},{"style":975},[9198],{"type":612,"value":9199},"5",{"type":606,"tag":636,"props":9201,"children":9202},{"style":751},[9203],{"type":612,"value":4467},{"type":606,"tag":636,"props":9205,"children":9206},{"style":975},[9207],{"type":612,"value":9208},"6",{"type":606,"tag":636,"props":9210,"children":9211},{"style":751},[9212],{"type":612,"value":4467},{"type":606,"tag":636,"props":9214,"children":9215},{"style":975},[9216],{"type":612,"value":9217},"7",{"type":606,"tag":636,"props":9219,"children":9220},{"style":751},[9221],{"type":612,"value":4467},{"type":606,"tag":636,"props":9223,"children":9224},{"style":975},[9225],{"type":612,"value":9226},"8",{"type":606,"tag":636,"props":9228,"children":9229},{"style":751},[9230],{"type":612,"value":4467},{"type":606,"tag":636,"props":9232,"children":9233},{"style":975},[9234],{"type":612,"value":9235},"9",{"type":606,"tag":636,"props":9237,"children":9238},{"style":751},[9239],{"type":612,"value":4467},{"type":606,"tag":636,"props":9241,"children":9242},{"style":975},[9243],{"type":612,"value":9244},"10",{"type":606,"tag":636,"props":9246,"children":9247},{"style":751},[9248],{"type":612,"value":9249},"])\n",{"type":606,"tag":636,"props":9251,"children":9252},{"class":638,"line":4434},[9253],{"type":606,"tag":636,"props":9254,"children":9255},{"style":751},[9256],{"type":612,"value":842},{"type":606,"tag":636,"props":9258,"children":9259},{"class":638,"line":4442},[9260],{"type":606,"tag":636,"props":9261,"children":9262},{"style":1542},[9263],{"type":612,"value":9264},"    # Chain operations\n",{"type":606,"tag":636,"props":9266,"children":9267},{"class":638,"line":4451},[9268,9273,9277,9282,9286],{"type":606,"tag":636,"props":9269,"children":9270},{"style":751},[9271],{"type":612,"value":9272},"    result ",{"type":606,"tag":636,"props":9274,"children":9275},{"style":745},[9276],{"type":612,"value":1172},{"type":606,"tag":636,"props":9278,"children":9279},{"style":751},[9280],{"type":612,"value":9281}," processor.filter_even().multiply_by(",{"type":606,"tag":636,"props":9283,"children":9284},{"style":975},[9285],{"type":612,"value":2536},{"type":606,"tag":636,"props":9287,"children":9288},{"style":751},[9289],{"type":612,"value":9290},").get_data()\n",{"type":606,"tag":636,"props":9292,"children":9293},{"class":638,"line":4488},[9294,9299,9303],{"type":606,"tag":636,"props":9295,"children":9296},{"style":751},[9297],{"type":612,"value":9298},"    stats ",{"type":606,"tag":636,"props":9300,"children":9301},{"style":745},[9302],{"type":612,"value":1172},{"type":606,"tag":636,"props":9304,"children":9305},{"style":751},[9306],{"type":612,"value":9307}," processor.get_stats()\n",{"type":606,"tag":636,"props":9309,"children":9310},{"class":638,"line":4522},[9311],{"type":606,"tag":636,"props":9312,"children":9313},{"style":751},[9314],{"type":612,"value":842},{"type":606,"tag":636,"props":9316,"children":9317},{"class":638,"line":4557},[9318,9322,9326,9330,9335],{"type":606,"tag":636,"props":9319,"children":9320},{"style":975},[9321],{"type":612,"value":4334},{"type":606,"tag":636,"props":9323,"children":9324},{"style":751},[9325],{"type":612,"value":1137},{"type":606,"tag":636,"props":9327,"children":9328},{"style":745},[9329],{"type":612,"value":4588},{"type":606,"tag":636,"props":9331,"children":9332},{"style":642},[9333],{"type":612,"value":9334},"\"  Original: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\"",{"type":606,"tag":636,"props":9336,"children":9337},{"style":751},[9338],{"type":612,"value":1147},{"type":606,"tag":636,"props":9340,"children":9341},{"class":638,"line":4565},[9342,9346,9350,9354,9359,9363,9368,9372,9376],{"type":606,"tag":636,"props":9343,"children":9344},{"style":975},[9345],{"type":612,"value":4334},{"type":606,"tag":636,"props":9347,"children":9348},{"style":751},[9349],{"type":612,"value":1137},{"type":606,"tag":636,"props":9351,"children":9352},{"style":745},[9353],{"type":612,"value":4588},{"type":606,"tag":636,"props":9355,"children":9356},{"style":642},[9357],{"type":612,"value":9358},"\"  After filter_even().multiply_by(2): ",{"type":606,"tag":636,"props":9360,"children":9361},{"style":975},[9362],{"type":612,"value":3802},{"type":606,"tag":636,"props":9364,"children":9365},{"style":751},[9366],{"type":612,"value":9367},"result",{"type":606,"tag":636,"props":9369,"children":9370},{"style":975},[9371],{"type":612,"value":3812},{"type":606,"tag":636,"props":9373,"children":9374},{"style":642},[9375],{"type":612,"value":3817},{"type":606,"tag":636,"props":9377,"children":9378},{"style":751},[9379],{"type":612,"value":1147},{"type":606,"tag":636,"props":9381,"children":9382},{"class":638,"line":4574},[9383,9387,9391,9395,9400,9404,9409,9413,9417],{"type":606,"tag":636,"props":9384,"children":9385},{"style":975},[9386],{"type":612,"value":4334},{"type":606,"tag":636,"props":9388,"children":9389},{"style":751},[9390],{"type":612,"value":1137},{"type":606,"tag":636,"props":9392,"children":9393},{"style":745},[9394],{"type":612,"value":4588},{"type":606,"tag":636,"props":9396,"children":9397},{"style":642},[9398],{"type":612,"value":9399},"\"  Stats: ",{"type":606,"tag":636,"props":9401,"children":9402},{"style":975},[9403],{"type":612,"value":3802},{"type":606,"tag":636,"props":9405,"children":9406},{"style":751},[9407],{"type":612,"value":9408},"stats",{"type":606,"tag":636,"props":9410,"children":9411},{"style":975},[9412],{"type":612,"value":3812},{"type":606,"tag":636,"props":9414,"children":9415},{"style":642},[9416],{"type":612,"value":3817},{"type":606,"tag":636,"props":9418,"children":9419},{"style":751},[9420],{"type":612,"value":1147},{"type":606,"tag":636,"props":9422,"children":9423},{"class":638,"line":4617},[9424],{"type":606,"tag":636,"props":9425,"children":9426},{"emptyLinePlaceholder":13},[9427],{"type":612,"value":661},{"type":606,"tag":636,"props":9429,"children":9430},{"class":638,"line":4661},[9431],{"type":606,"tag":636,"props":9432,"children":9433},{"emptyLinePlaceholder":13},[9434],{"type":612,"value":661},{"type":606,"tag":636,"props":9436,"children":9437},{"class":638,"line":4706},[9438,9442,9446,9450,9454],{"type":606,"tag":636,"props":9439,"children":9440},{"style":745},[9441],{"type":612,"value":5092},{"type":606,"tag":636,"props":9443,"children":9444},{"style":975},[9445],{"type":612,"value":5097},{"type":606,"tag":636,"props":9447,"children":9448},{"style":745},[9449],{"type":612,"value":5102},{"type":606,"tag":636,"props":9451,"children":9452},{"style":642},[9453],{"type":612,"value":5107},{"type":606,"tag":636,"props":9455,"children":9456},{"style":751},[9457],{"type":612,"value":818},{"type":606,"tag":636,"props":9459,"children":9460},{"class":638,"line":4748},[9461],{"type":606,"tag":636,"props":9462,"children":9463},{"style":751},[9464],{"type":612,"value":9465},"    demonstrate_utilities()\n",{"type":606,"tag":5140,"props":9467,"children":9469},{"id":9468},"documentation-guidelines",[9470],{"type":612,"value":9471},"📋 Documentation Guidelines",{"type":606,"tag":9473,"props":9474,"children":9475},"table",{},[9476,9500],{"type":606,"tag":9477,"props":9478,"children":9479},"thead",{},[9480],{"type":606,"tag":9481,"props":9482,"children":9483},"tr",{},[9484,9490,9495],{"type":606,"tag":9485,"props":9486,"children":9487},"th",{},[9488],{"type":612,"value":9489},"Element",{"type":606,"tag":9485,"props":9491,"children":9492},{},[9493],{"type":612,"value":9494},"Purpose",{"type":606,"tag":9485,"props":9496,"children":9497},{},[9498],{"type":612,"value":9499},"Example",{"type":606,"tag":9501,"props":9502,"children":9503},"tbody",{},[9504,9530,9551,9572,9597,9622],{"type":606,"tag":9481,"props":9505,"children":9506},{},[9507,9516,9521],{"type":606,"tag":9508,"props":9509,"children":9510},"td",{},[9511],{"type":606,"tag":5162,"props":9512,"children":9513},{},[9514],{"type":612,"value":9515},"Module Docstring",{"type":606,"tag":9508,"props":9517,"children":9518},{},[9519],{"type":612,"value":9520},"Explain module purpose and usage",{"type":606,"tag":9508,"props":9522,"children":9523},{},[9524],{"type":606,"tag":632,"props":9525,"children":9527},{"className":9526},[],[9528],{"type":612,"value":9529},"\"\"\"User authentication utilities\"\"\"",{"type":606,"tag":9481,"props":9531,"children":9532},{},[9533,9541,9546],{"type":606,"tag":9508,"props":9534,"children":9535},{},[9536],{"type":606,"tag":5162,"props":9537,"children":9538},{},[9539],{"type":612,"value":9540},"Function Docstring",{"type":606,"tag":9508,"props":9542,"children":9543},{},[9544],{"type":612,"value":9545},"Describe parameters, returns, raises",{"type":606,"tag":9508,"props":9547,"children":9548},{},[9549],{"type":612,"value":9550},"Args, Returns, Raises sections",{"type":606,"tag":9481,"props":9552,"children":9553},{},[9554,9562,9567],{"type":606,"tag":9508,"props":9555,"children":9556},{},[9557],{"type":606,"tag":5162,"props":9558,"children":9559},{},[9560],{"type":612,"value":9561},"Class Docstring",{"type":606,"tag":9508,"props":9563,"children":9564},{},[9565],{"type":612,"value":9566},"Explain what class represents",{"type":606,"tag":9508,"props":9568,"children":9569},{},[9570],{"type":612,"value":9571},"Purpose, key attributes, usage",{"type":606,"tag":9481,"props":9573,"children":9574},{},[9575,9583,9588],{"type":606,"tag":9508,"props":9576,"children":9577},{},[9578],{"type":606,"tag":5162,"props":9579,"children":9580},{},[9581],{"type":612,"value":9582},"Inline Comments",{"type":606,"tag":9508,"props":9584,"children":9585},{},[9586],{"type":612,"value":9587},"Clarify complex logic",{"type":606,"tag":9508,"props":9589,"children":9590},{},[9591],{"type":606,"tag":632,"props":9592,"children":9594},{"className":9593},[],[9595],{"type":612,"value":9596},"# Calculate tax rate for region",{"type":606,"tag":9481,"props":9598,"children":9599},{},[9600,9608,9613],{"type":606,"tag":9508,"props":9601,"children":9602},{},[9603],{"type":606,"tag":5162,"props":9604,"children":9605},{},[9606],{"type":612,"value":9607},"Type Hints",{"type":606,"tag":9508,"props":9609,"children":9610},{},[9611],{"type":612,"value":9612},"Specify parameter and return types",{"type":606,"tag":9508,"props":9614,"children":9615},{},[9616],{"type":606,"tag":632,"props":9617,"children":9619},{"className":9618},[],[9620],{"type":612,"value":9621},"def func(x: int) -> str:",{"type":606,"tag":9481,"props":9623,"children":9624},{},[9625,9633,9638],{"type":606,"tag":9508,"props":9626,"children":9627},{},[9628],{"type":606,"tag":5162,"props":9629,"children":9630},{},[9631],{"type":612,"value":9632},"Examples",{"type":606,"tag":9508,"props":9634,"children":9635},{},[9636],{"type":612,"value":9637},"Show how to use the code",{"type":606,"tag":9508,"props":9639,"children":9640},{},[9641],{"type":612,"value":9642},"Doctest format examples",{"type":606,"tag":5140,"props":9644,"children":9646},{"id":9645},"key-takeaways",[9647],{"type":612,"value":9648},"🎯 Key Takeaways",{"type":606,"tag":5152,"props":9650,"children":9654},{"emoji":9651,"title":9652,"type":9653},"📚","Documentation Essentials","success",[9655,9663,9686,9694,9721,9729,9752,9760,9782],{"type":606,"tag":615,"props":9656,"children":9657},{},[9658],{"type":606,"tag":5162,"props":9659,"children":9660},{},[9661],{"type":612,"value":9662},"Good Documentation:",{"type":606,"tag":5168,"props":9664,"children":9665},{},[9666,9671,9676,9681],{"type":606,"tag":5172,"props":9667,"children":9668},{},[9669],{"type":612,"value":9670},"Explains what the code does and why",{"type":606,"tag":5172,"props":9672,"children":9673},{},[9674],{"type":612,"value":9675},"Includes examples of how to use it",{"type":606,"tag":5172,"props":9677,"children":9678},{},[9679],{"type":612,"value":9680},"Documents parameters, return values, and exceptions",{"type":606,"tag":5172,"props":9682,"children":9683},{},[9684],{"type":612,"value":9685},"Uses clear, simple language",{"type":606,"tag":615,"props":9687,"children":9688},{},[9689],{"type":606,"tag":5162,"props":9690,"children":9691},{},[9692],{"type":612,"value":9693},"Docstring Format:",{"type":606,"tag":5168,"props":9695,"children":9696},{},[9697,9702,9707,9712,9716],{"type":606,"tag":5172,"props":9698,"children":9699},{},[9700],{"type":612,"value":9701},"Triple quotes for multi-line strings",{"type":606,"tag":5172,"props":9703,"children":9704},{},[9705],{"type":612,"value":9706},"Brief one-line summary first",{"type":606,"tag":5172,"props":9708,"children":9709},{},[9710],{"type":612,"value":9711},"Detailed description if needed",{"type":606,"tag":5172,"props":9713,"children":9714},{},[9715],{"type":612,"value":9550},{"type":606,"tag":5172,"props":9717,"children":9718},{},[9719],{"type":612,"value":9720},"Examples in doctest format",{"type":606,"tag":615,"props":9722,"children":9723},{},[9724],{"type":606,"tag":5162,"props":9725,"children":9726},{},[9727],{"type":612,"value":9728},"Comments:",{"type":606,"tag":5168,"props":9730,"children":9731},{},[9732,9737,9742,9747],{"type":606,"tag":5172,"props":9733,"children":9734},{},[9735],{"type":612,"value":9736},"Explain why, not what",{"type":606,"tag":5172,"props":9738,"children":9739},{},[9740],{"type":612,"value":9741},"Clarify business logic and complex algorithms",{"type":606,"tag":5172,"props":9743,"children":9744},{},[9745],{"type":612,"value":9746},"Document temporary solutions and workarounds",{"type":606,"tag":5172,"props":9748,"children":9749},{},[9750],{"type":612,"value":9751},"Keep comments up-to-date with code changes",{"type":606,"tag":615,"props":9753,"children":9754},{},[9755],{"type":606,"tag":5162,"props":9756,"children":9757},{},[9758],{"type":612,"value":9759},"Type Hints:",{"type":606,"tag":5168,"props":9761,"children":9762},{},[9763,9767,9772,9777],{"type":606,"tag":5172,"props":9764,"children":9765},{},[9766],{"type":612,"value":9612},{"type":606,"tag":5172,"props":9768,"children":9769},{},[9770],{"type":612,"value":9771},"Help with IDE autocomplete and error detection",{"type":606,"tag":5172,"props":9773,"children":9774},{},[9775],{"type":612,"value":9776},"Make code more self-documenting",{"type":606,"tag":5172,"props":9778,"children":9779},{},[9780],{"type":612,"value":9781},"Optional but highly recommended",{"type":606,"tag":615,"props":9783,"children":9784},{},[9785,9789],{"type":606,"tag":5162,"props":9786,"children":9787},{},[9788],{"type":612,"value":5277},{"type":612,"value":9790}," Good documentation is an investment in your future productivity!",{"type":606,"tag":5140,"props":9792,"children":9794},{"id":9793},"whats-next",[9795],{"type":612,"value":9796},"🚀 What's Next?",{"type":606,"tag":615,"props":9798,"children":9799},{},[9800],{"type":612,"value":9801},"Learn how to use type hints to make your Python code more robust and self-documenting.",{"type":606,"tag":615,"props":9803,"children":9804},{},[9805,9810,9811],{"type":606,"tag":5162,"props":9806,"children":9807},{},[9808],{"type":612,"value":9809},"Continue to",{"type":612,"value":6087},{"type":606,"tag":9812,"props":9813,"children":9814},"a",{"href":585},[9815],{"type":612,"value":586},{"type":606,"tag":9817,"props":9818,"children":9819},"style",{},[9820],{"type":612,"value":9821},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .app-dark-mode .shiki span {color: var(--shiki-app-dark-mode);background: var(--shiki-app-dark-mode-bg);font-style: var(--shiki-app-dark-mode-font-style);font-weight: var(--shiki-app-dark-mode-font-weight);text-decoration: var(--shiki-app-dark-mode-text-decoration);}html.app-dark-mode .shiki span {color: var(--shiki-app-dark-mode);background: var(--shiki-app-dark-mode-bg);font-style: var(--shiki-app-dark-mode-font-style);font-weight: var(--shiki-app-dark-mode-font-weight);text-decoration: var(--shiki-app-dark-mode-text-decoration);}",{"title":8,"searchDepth":36,"depth":36,"links":9823},[9824,9827,9828,9829],{"id":5142,"depth":27,"text":5145,"children":9825},[9826],{"id":5283,"depth":36,"text":5286},{"id":9468,"depth":27,"text":9471},{"id":9645,"depth":27,"text":9648},{"id":9793,"depth":27,"text":9796},1782373765116]