Port the `from_python` method from pyelasticsearch to the Elasticsearch backend, similar to `to_python` in 181bbc2c010a135b536e4d1f7a1c5ae4c63e33db.

Fixes #762. Refs #759.