docs: def get_elasticsearch_info():
      """Check Elasticsearch connection."""
      from elasticsearch import (
          Elasticsearch,
          ConnectionError as ESConnectionError
      )
      if hasattr(settings, 'ELASTICSEARCH_URL'):
          url = settings.ELASTICSEARCH_URL
      else:
          return {"status": NO_CONFIG}
      start = datetime.now()
      try:
          search = Elasticsearch(url, request_timeout=TIMEOUT_SECONDS)
          search.info()
      except ESConnectionError:
          return {"status": DOWN}
      del search  # The elasticsearch library has no "close" or "disconnect."
      micro = (datetime.now() - start).microseconds
      return {
          "status": UP, "response_microseconds": micro,
      }