code: def test_grid_data_filtered_on_run_type_and_run_state(
      admin_client, dag_with_runs
  ):
      for uri_params, expected_run_types, expected_run_states in [
          (
              "run_state=success&run_state=queued",
              ["scheduled"],
              ["success"],
          ),
          (
              "run_state=running&run_state=failed",
              ["scheduled"],
              ["running"],
          ),
          (
              "run_type=scheduled&run_type=manual",
              ["scheduled", "scheduled"],
              ["success", "running"],
          ),
          ("run_type=backfill&run_type=manual", [], []),
          (
              "run_state=running&run_type=failed&run_type=backfill&run_type=manual",
              [],
              [],
          ),
          (
              "run_state=running&run_type=failed&run_type=scheduled&run_type=backfill&run_type=manual",
              ["scheduled"],
              ["running"],
          ),
      ]:
          resp = admin_client.get(
              f"/object/grid_data?dag_id={DAG_ID}&{uri_params}",
              follow_redirects=True,
          )
          assert resp.status_code == 200, resp.json
          actual_run_types = list(
              map(lambda x: x["run_type"], resp.json["dag_runs"])
          )
          actual_run_states = list(
              map(lambda x: x["state"], resp.json["dag_runs"])
          )
          assert actual_run_types == expected_run_types
          assert actual_run_states == expected_run_states
  
imports: from __future__ import annotations
  from typing import TYPE_CHECKING
  import pendulum
  import pytest
  from dateutil.tz import UTC
  from airflow.datasets import Dataset
  from airflow.decorators import task_group
  from airflow.lineage.entities import File
  from airflow.models import DagBag
  from airflow.models.dataset import DatasetDagRunQueue, DatasetEvent, DatasetModel
  from airflow.operators.empty import EmptyOperator
  from airflow.utils import timezone
  from airflow.utils.state import DagRunState, TaskInstanceState
  from airflow.utils.task_group import TaskGroup
  from airflow.utils.types import DagRunType
  from airflow.www.views import dag_to_grid
  from tests.test_utils.asserts import assert_queries_count
  from tests.test_utils.db import clear_db_datasets, clear_db_runs
  from tests.test_utils.mock_operators import MockOperator
label_desc: Use image node_id 6 for calling a global function with example usage: test_grid_data_filtered_on_run_type_and_run_state(admin_client, dag_with_runs) without return types