[python] Return first N key:value pairs from dict