code: def get_table_rows(table_soup):
      table_row_selectors = [
          "table > tr",
          "table > thead > tr",
          "table > tbody > tr",
          "table > tfoot > tr",
      ]
      # If there's a header, body, footer or direct child tr tags, add row dimensions from there
      return table_soup.select(
          ", ".join(table_row_selectors), recursive=False
      )
  
imports: import re
  import docx
  from docx import Document
  from bs4 import BeautifulSoup
  from html.parser import HTMLParser
label_desc: Use image node_id 1 for calling a global function with example usage: get_table_rows(table_soup) and returns: table_soup