copied sgiven function to lab2.py and mnist package included