Import itertools for subkeys_for_path.