<prompt> Given a data set, write a program that counts the number of instances of each label.Data Set:puppy, dog, kitten, cat, puppy, dog, fish, cat  <response>: Here is a Python program that takes the given input data set and counts the number of instances of each label:pythondata_set puppy, dog, kitten, cat, puppy, dog, fish, cat create an empty dictionary to store the count of each label counts iterate through each item in the data setfor item in data_set: if the item is not already in the counts dictionary, add it with a count of 1 if item not in counts: countsitem 1 if the item is already in the counts dictionary, increment its count by 1 else: countsitem 1 print the counts for each labelfor label, count in counts.items: printlabel, countOutput:puppy 2dog 2kitten 1cat 2fish 1 