code: def test_should_filter_eventlogs_by_when(
      self, create_log_model, session
  ):
      eventlog1 = create_log_model(
          event="TEST_EVENT_1", when=self.default_time
      )
      eventlog2 = create_log_model(
          event="TEST_EVENT_2", when=self.default_time_2
      )
      session.add_all([eventlog1, eventlog2])
      session.commit()
      for when_attr, expected_eventlogs in {
          "before": {"TEST_EVENT_1"},
          "after": {"TEST_EVENT_2"},
      }.items():
          response = self.client.get(
              f"/api/v1/eventLogs?{when_attr}=2020-06-10T20%3A00%3A01%2B00%3A00",  # self.default_time + 1s
              environ_overrides={"REMOTE_USER": "test"},
          )
          assert response.status_code == 200
          assert {
              eventlog["event"]
              for eventlog in response.json["event_logs"]
          } == expected_eventlogs
  
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 5 for calling the TestGetEventLogs obj's underlying member method code with example usage: obj.test_should_filter_eventlogs_by_when(create_log_model, session) without return types