code: def instrument(client):
      
      from elasticapm.instrumentation.control import instrument
  
      instrument()
      try:
          import celery  # noqa F401
          from elasticapm.contrib.celery import register_instrumentation
  
          register_instrumentation(client)
      except ImportError:
          client.logger.debug("Not instrumenting Celery, couldn't import")
docs: Auto-instruments code to get nice spans