'Create a hashed key based on settings.
This allows us to cache Elasticsearch objects based on settings.'

@classmethod
def _key(cls, es_settings):

    es_settings = sorted(es_settings.items(), key=(lambda item: item[0]))
    es_settings = repr([(k, v) for (k, v) in es_settings])
    return tuple(es_settings)
