code: def get_client(client=None):
      
      global _client
  
      tmp_client = client is not None
      if not tmp_client:
          config = getattr(django_settings, "ELASTIC_APM", {})
          client = config.get("CLIENT", default_client_class)
  
      if _client[0] != client:
          client_class = import_string(client)
          instance = client_class()
          if not tmp_client:
              _client = (client, instance)
          return instance
      return _client[1]
docs: Get an ElasticAPM client.
  
      :param client:
      :return:
      :rtype: elasticapm.base.Client