docstr: Select Date in DPR component with a day_range tuple
  compid: the id defined for component
  day_range: a tuple or list, defines the start and end date you want to
      select, the tuple must be length of 1 or 2, i.e.
      (start, ) or (start, end)
  start_first: boolean value decides clicking start or end date.
      default True
docstr_tok: ["Select","Date","in","DPR","component","with","a","day_range","tuple","compid",":","the","id","defined","for","component","day_range",":","a","tuple","or","list",",","defines","the","start","and","end","date","you","want","to","select",",","the","tuple","must","be","length","of","1","or","2",",","i.e",".","(","start",",",")","or","(","start",",","end",")","start_first",":","boolean","value","decides","clicking","start","or","end","date",".","default","True"]
code: def select_date_range(self, compid, day_range, start_first=True):
      """Select Date in DPR component with a day_range tuple
      compid: the id defined for component
      day_range: a tuple or list, defines the start and end date you want to
          select, the tuple must be length of 1 or 2, i.e.
          (start, ) or (start, end)
      start_first: boolean value decides clicking start or end date.
          default True
      """
  
      if (
          not day_range
          or not isinstance(day_range, (tuple, list))
          or not set(range(1, 32)).issuperset(day_range)
          or len(day_range) > 2
      ):
          logger.error(
              "data_range is provided with an invalid value %s\n"
              "the accepted range is range(1, 32)",
              day_range,
          )
          return
  
      prefix = "Start" if start_first else "End"
      date = self.find_element(
          f'#{compid} input[aria-label="{prefix} Date"]'
      )
      date.click()
      for day in day_range:
          self._wait_until_day_is_clickable()
          matched = [
              _
              for _ in self.find_elements(self.date_picker_day_locator)
              if _.text == str(day)
          ]
          matched[0].click()
  
      return self.get_date_range(compid)
  
file_path: dash/components/dash-core-components/tests/dash_core_components_page.py
imports: import logging
  from selenium.webdriver.support.ui import WebDriverWait
  from selenium.webdriver.common.by import By
  from selenium.webdriver.support import expected_conditions
  from selenium.webdriver.common.action_chains import ActionChains
label_desc: Use image node_id 2 for calling the DashCoreComponentsMixin obj's underlying member method code with example usage: obj.select_date_range(compid, day_range, start_first) and returns: self