parameters: (symbol_page_html, symbol_name)
return_statement: return headers or all_headers
docstring: Parse symbol page and retrieve the include header defined in this page.
    The symbol page provides header for the symbol, specifically in
    "Defined in header <header>" section. An example:
  
    <tr class="t-dsc-header">
      <td colspan="2"> <div>Defined in header <code>&lt;ratio&gt;</code> </div>
    </td></tr>
  
    Returns a list of headers.
docstring_summary: Parse symbol page and retrieve the include header defined in this page.
    The symbol page provides header for the symbol, specifically in
    "Defined in header <header>" section. An example:
docstring_tokens: Parse symbol page and retrieve the include header defined in this page . The symbol page provides header for the symbol specifically in Defined in header <header > section . An example :
function: def _ParseSymbolPage(symbol_page_html, symbol_name):
    """Parse symbol page and retrieve the include header defined in this page.
    The symbol page provides header for the symbol, specifically in
    "Defined in header <header>" section. An example:
  
    <tr class="t-dsc-header">
      <td colspan="2"> <div>Defined in header <code>&lt;ratio&gt;</code> </div>
    </td></tr>
  
    Returns a list of headers.
    """
    headers = set()
    all_headers = set()
  
    soup = BeautifulSoup(symbol_page_html, "html.parser")
    # Rows in table are like:
    #   Defined in header <foo>      .t-dsc-header
    #   Defined in header <bar>      .t-dsc-header
    #   decl1                        .t-dcl
    #   Defined in header <baz>      .t-dsc-header
    #   decl2                        .t-dcl
    for table in soup.select('table.t-dcl-begin, table.t-dsc-begin'):
      current_headers = []
      was_decl = False
      for row in table.select('tr'):
        if _HasClass(row, 't-dcl', 't-dsc'):
          was_decl = True
          # Symbols are in the first cell.
          found_symbols = row.find('td').stripped_strings
          if not symbol_name in found_symbols:
            continue
          headers.update(current_headers)
        elif _HasClass(row, 't-dsc-header'):
          # If we saw a decl since the last header, this is a new block of headers
          # for a new block of decls.
          if was_decl:
            current_headers = []
          was_decl = False
          # There are also .t-dsc-header for "defined in namespace".
          if not "Defined in header " in row.text:
            continue
          # The interesting header content (e.g. <cstdlib>) is wrapped in <code>.
          for header_code in row.find_all("code"):
            current_headers.append(header_code.text)
            all_headers.add(header_code.text)
    # If the symbol was never named, consider all named headers.
    return headers or all_headers
function_tokens: def _ParseSymbolPage ( symbol_page_html , symbol_name ) : headers = set ( ) all_headers = set ( ) soup = BeautifulSoup ( symbol_page_html , "html.parser" ) # Rows in table are like: #   Defined in header <foo>      .t-dsc-header #   Defined in header <bar>      .t-dsc-header #   decl1                        .t-dcl #   Defined in header <baz>      .t-dsc-header #   decl2                        .t-dcl for table in soup . select ( 'table.t-dcl-begin, table.t-dsc-begin' ) : current_headers = [ ] was_decl = False for row in table . select ( 'tr' ) : if _HasClass ( row , 't-dcl' , 't-dsc' ) : was_decl = True # Symbols are in the first cell. found_symbols = row . find ( 'td' ) . stripped_strings if not symbol_name in found_symbols : continue headers . update ( current_headers ) elif _HasClass ( row , 't-dsc-header' ) : # If we saw a decl since the last header, this is a new block of headers # for a new block of decls. if was_decl : current_headers = [ ] was_decl = False # There are also .t-dsc-header for "defined in namespace". if not "Defined in header " in row . text : continue # The interesting header content (e.g. <cstdlib>) is wrapped in <code>. for header_code in row . find_all ( "code" ) : current_headers . append ( header_code . text ) all_headers . add ( header_code . text ) # If the symbol was never named, consider all named headers. return headers or all_headers