code: def test_cdpr001_date_clearable_true_works(dash_dcc):
      app = Dash(__name__)
      app.layout = html.Div(
          [
              dcc.DatePickerRange(id="dpr", clearable=True),
              dcc.DatePickerSingle(id="dps", clearable=True),
          ]
      )
  
      dash_dcc.start_server(app)
  
      # DPR
      start_date, end_date = dash_dcc.select_date_range("dpr", (1, 28))
      close_btn = dash_dcc.wait_for_element(
          'button[aria-label="Clear Dates"]'
      )
  
      assert (
          "1" in start_date and "28" in end_date
      ), "both start date and end date should match the selected day"
  
      close_btn.click()
      start_date, end_date = dash_dcc.get_date_range("dpr")
      assert (
          not start_date and not end_date
      ), "both start and end dates should be cleared"
  
      # DPS
      selected = dash_dcc.select_date_single("dps", day="1")
  
      assert selected, "single date should get a value"
      close_btn = dash_dcc.wait_for_element("#dps button")
      close_btn.click()
      (single_date,) = dash_dcc.get_date_range("dps")
      assert not single_date, "date should be cleared"
  
      assert dash_dcc.get_logs() == []
  
imports: import itertools
  import pytest
  from dash import Dash, Input, Output, html, dcc
  import dash.testing.wait
label_desc: Use image node_id 1 for calling a global function with example usage: test_cdpr001_date_clearable_true_works(dash_dcc) without return types