code: def test_should_filter_eventlogs_by_allowed_attributes(
      self, create_log_model, session
  ):
      eventlog1 = create_log_model(
          event="TEST_EVENT_1",
          dag_id="TEST_DAG_ID_1",
          task_id="TEST_TASK_ID_1",
          owner="TEST_OWNER_1",
          when=self.default_time,
      )
      eventlog2 = create_log_model(
          event="TEST_EVENT_2",
          dag_id="TEST_DAG_ID_2",
          task_id="TEST_TASK_ID_2",
          owner="TEST_OWNER_2",
          when=self.default_time_2,
      )
      session.add_all([eventlog1, eventlog2])
      session.commit()
      for attr in ["dag_id", "task_id", "owner", "event"]:
          attr_value = f"TEST_{attr}_1".upper()
          response = self.client.get(
              f"/api/v1/eventLogs?{attr}={attr_value}",
              environ_overrides={"REMOTE_USER": "test_granular"},
          )
          assert response.status_code == 200
          assert {
              eventlog[attr] for eventlog in response.json["event_logs"]
          } == {attr_value}
  
imports: from __future__ import annotations
  import pytest
  from airflow.api_connexion.exceptions import EXCEPTIONS_LINK_MAP
  from airflow.models import Log
  from airflow.security import permissions
  from airflow.utils import timezone
  from tests.test_utils.api_connexion_utils import assert_401, create_user, delete_user
  from tests.test_utils.config import conf_vars
  from tests.test_utils.db import clear_db_logs
label_desc: Use image node_id 4 for calling the TestGetEventLogs obj's underlying member method code with example usage: obj.test_should_filter_eventlogs_by_allowed_attributes(create_log_model, session) without return types