code: def test_extra_fields(self, es_json_formatter, log_record):
      es_json_formatter.json_fields = self.JSON_FIELDS
      es_json_formatter.extras = self.EXTRA_FIELDS
      formatted = es_json_formatter.format(log_record)
      data = json.loads(formatted)
      assert all(
          (key in self.JSON_FIELDS or key in self.EXTRA_FIELDS)
          for key in data.keys()
      )
      assert data["filename"] == "test_file.txt"
      assert data["lineno"] == 1
      assert data["levelname"] == "INFO"
      assert data["dag_id"] == "dag1"
      assert data["task_id"] == "task1"
      assert data["execution_date"] == "2023-11-17"
      assert data["try_number"] == "1"
      assert data["log_id"] == "Some_log_id"
  
file_path: airflow/tests/providers/elasticsearch/log/test_es_json_formatter.py
imports: from __future__ import annotations
  import json
  import logging
  import pendulum
  import pytest
  from airflow.providers.elasticsearch.log.es_task_handler import ElasticsearchJSONFormatter
label_desc: Use image node_id 5 for calling the TestElasticsearchJSONFormatter obj's underlying member method code with example usage: obj.test_extra_fields(es_json_formatter, log_record) without return types