code: def cells_are_same_width(test, target_selector, table_selector):
      # this test is very dependent on the table's implementation details..  we are testing that all the cells are
      # the same width after all..
  
      def assertions():
          target = test.wait_for_element(target_selector)
          table = test.wait_for_element(table_selector)
  
          wait.until(
              lambda: target.size["width"] != 0
              and abs(target.size["width"] - table.size["width"]) <= 1,
              3,
          )
          target_cells = target.find_elements(
              By.CSS_SELECTOR,
              ".cell-1-1 > table > tbody > tr:last-of-type > *",
          )
          table_r0c0_cells = table.find_elements(
              By.CSS_SELECTOR,
              ".cell-0-0 > table > tbody > tr:last-of-type > *",
          )
          table_r0c1_cells = table.find_elements(
              By.CSS_SELECTOR,
              ".cell-0-1 > table > tbody > tr:last-of-type > *",
          )
          table_r1c0_cells = table.find_elements(
              By.CSS_SELECTOR,
              ".cell-1-0 > table > tbody > tr:last-of-type > *",
          )
          table_r1c1_cells = table.find_elements(
              By.CSS_SELECTOR,
              ".cell-1-1 > table > tbody > tr:last-of-type > *",
          )
  
          # make sure the r1c1 fragment contains all the cells
          assert len(target_cells) == len(table_r1c1_cells)
  
          # for each cell of each fragment, allow a difference of up to 1px either way since
          # the resize algorithm can be off by 1px for cycles
          for i, target_cell in enumerate(target_cells):
              assert (
                  abs(
                      target_cell.size["width"]
                      - table_r1c1_cells[i].size["width"]
                  )
                  <= 1
              )
  
              if len(table_r0c0_cells) != 0:
                  assert (
                      abs(
                          target_cell.size["width"]
                          - table_r0c0_cells[i].size["width"]
                      )
                      <= 1
                  )
  
              if len(table_r0c1_cells) != 0:
                  assert (
                      abs(
                          target_cell.size["width"]
                          - table_r0c1_cells[i].size["width"]
                      )
                      <= 1
                  )
  
              if len(table_r1c0_cells) != 0:
                  assert (
                      abs(
                          target_cell.size["width"]
                          - table_r1c0_cells[i].size["width"]
                      )
                      <= 1
                  )
  
      retry = 0
  
      while retry < 3:
          try:
              assertions()
              break
          except StaleElementReferenceException:
              retry += 1
  
file_path: dash/components/dash-table/tests/selenium/test_sizing.py
imports: from selenium.common.exceptions import StaleElementReferenceException
  from selenium.webdriver.common.by import By
  import dash
  from utils import get_props
  from dash.dependencies import Input, Output
  from dash.exceptions import PreventUpdate
  from dash.testing import wait
  from dash.dash_table import DataTable
  from dash.html import Button, Div
label_desc: Use image node_id 1 for calling a global function with example usage: cells_are_same_width(test, target_selector, table_selector) without return types