adding support for deprecated method "from_python"

the latest haystack 2.0.0 does not work with pyelasticsearch, so with
this fix it works perfectly