code: def test_raises_400_for_invalid_arg(self):
      invalid_datetime = "2020-06-13T22:44:00P"
      with pytest.raises(BadRequest):
          format_datetime(invalid_datetime)
  
imports: from __future__ import annotations
  from unittest import mock
  import pendulum
  import pytest
  from airflow.api_connexion.exceptions import BadRequest
  from airflow.api_connexion.parameters import check_limit, format_datetime, format_parameters, validate_istimezone
  from airflow.utils import timezone
  from tests.test_utils.config import conf_vars
label_desc: Use image node_id 4 for calling the TestDateTimeParser obj's underlying member method code with example usage: obj.test_raises_400_for_invalid_arg() without return types