<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def nlargest(self, n=None):
 		"""List the n most common elements and their counts. 		List is from the most 		common to the least. If n is None, the list all element counts. 		Run time should be O(m log m) where m is len(self) 		Args: 			n (int):
 The number of elements to return 		"""

		if n is None:
			return sorted(self.counts(), key=itemgetter(1), reverse=True)
		else:
			return heapq.nlargest(n, self.counts(), key=itemgetter(1))