Missing itertools import
**Description**

Missing itertools import in `sampleset.py`

https://github.com/dwavesystems/dimod/blob/30c9b5a8bc289aee9b276a4ebc2ce27e8413e2f9/dimod/sampleset.py#L517

**Steps To Reproduce**
```
resp.samples(n=1)
```


diff --git a/dimod/sampleset.py b/dimod/sampleset.py
index 682aac68..70e3795f 100644
--- a/dimod/sampleset.py
+++ b/dimod/sampleset.py
@@ -21,6 +21,8 @@ of NumPy's array_like_ to allow for arbitrary variable labels.
     like-objects-to-numpy-arrays
 
 """
+import itertools
+
 from collections import Iterable, Sized, Mapping, Iterator
 from collections import namedtuple
 
diff --git a/tests/test_sampleset.py b/tests/test_sampleset.py
index 0e952b2e..2c2b8be4 100644
--- a/tests/test_sampleset.py
+++ b/tests/test_sampleset.py
@@ -83,6 +83,11 @@ class TestSampleSet(unittest.TestCase):
         self.assertNotEqual(ss0, ss2)
         self.assertNotEqual(ss1, ss3)
 
+    def test_shorter_samples(self):
+        ss = dimod.SampleSet.from_samples(np.ones((100, 5), dtype='int8'), dimod.BINARY, energy=np.ones(100))
+
+        self.assertEqual(len(list(ss.samples(n=1))), 1)
+
 
 class TestSampleSetSerialization(unittest.TestCase):
 
['dimod/sampleset.py', 'tests/test_sampleset.py']