code: def test_dagrun_status(self):
      url_template = "/api/experimental/dags/{}/dag_runs/{}"
      dag_id = "example_bash_operator"
      execution_date = utcnow().replace(microsecond=0)
      datetime_string = quote_plus(execution_date.isoformat())
      wrong_datetime_string = quote_plus(
          datetime(1990, 1, 1, 1, 1, 1).isoformat()
      )
  
      # Create DagRun
      trigger_dag(
          dag_id=dag_id,
          run_id="test_task_instance_info_run",
          execution_date=execution_date,
      )
  
      # Test Correct execution
      response = self.client.get(
          url_template.format(dag_id, datetime_string)
      )
      self.assert_deprecated(response)
      assert 200 == response.status_code
      assert "state" in response.data.decode("utf-8")
      assert "error" not in response.data.decode("utf-8")
  
      # Test error for nonexistent dag
      response = self.client.get(
          url_template.format("does_not_exist_dag", datetime_string),
      )
      assert 404 == response.status_code
      assert "error" in response.data.decode("utf-8")
  
      # Test error for nonexistent dag run (wrong execution_date)
      response = self.client.get(
          url_template.format(dag_id, wrong_datetime_string)
      )
      assert 404 == response.status_code
      assert "error" in response.data.decode("utf-8")
  
      # Test error for bad datetime format
      response = self.client.get(
          url_template.format(dag_id, "not_a_datetime")
      )
      assert 400 == response.status_code
      assert "error" in response.data.decode("utf-8")
  
imports: from __future__ import annotations
  import json
  import os
  import re
  from datetime import timedelta
  from unittest import mock
  from urllib.parse import quote_plus
  import pytest
  from airflow import settings
  from airflow.api.common.experimental.trigger_dag import trigger_dag
  from airflow.models import DagBag, DagRun, Pool, TaskInstance
  from airflow.models.serialized_dag import SerializedDagModel
  from airflow.settings import Session
  from airflow.utils.timezone import datetime, parse, utcnow
  from airflow.version import version
  from tests.test_utils.db import clear_db_pools
label_desc: Use image node_id 10 for calling the TestApiExperimental obj's underlying member method code with example usage: obj.test_dagrun_status() without return types