Question: 
Write a function to get the n smallest items from a dataset.


Model's Code:
def small_nnum(data, n):
    return sorted(data)[:n]



Sample Correct Code:
import heapq
def small_nnum(list1,n):
  smallest=heapq.nsmallest(n,list1)
  return smallest


Asserts:
assert small_nnum([10, 20, 50, 70, 90, 20, 50, 40, 60, 80, 100],2)==[10,20]
assert small_nnum([10, 20, 50, 70, 90, 20, 50, 40, 60, 80, 100],5)==[10,20,20,40,50]
assert small_nnum([10, 20, 50, 70, 90, 20, 50, 40, 60, 80, 100],3)==[10,20,20]


Tests:
Test 1 of 3: PASS
Test 2 of 3: PASS
Test 3 of 3: PASS

Test 10 of 974: 7/10 (70.0%): success