string in searches and store tags for each note ''def __init__(selfmemotags='')'''initialize note with memo and optional space-separated tags automatically set the note' creation date and unique id ''self memo memo self tags tags self creation_date datetime date today(global last_id last_id + self id last_id def match(selffilter)'''determine if this note matches the filter text return true if it matchesfalse otherwise search is case sensitive and matches both text and tags ''return filter in self memo or filter in self tags before continuingwe should quickly fire up the interactive interpreter and test our code so far test frequently and often because things never work the way you expect them to indeedwhen tested my first version of this examplei found out had forgotten the self argument in the match functionwe'll discuss automated testing in python design patterns for nowit suffices to check few things using the interpreterfrom notebook import note note("hello first" note("hello again" id id match('hello'true match('second'false