code: def get_br_stock_symbols(qlib_data_path: [str, Path] = None) -> list:
      """get Brazil(B3) stock symbols
  
      Returns
      -------
          B3 stock symbols
      """
      global _BR_SYMBOLS  # pylint: disable=W0603
  
      @deco_retry
      def _get_ibovespa():
          _symbols = []
          url = "https://www.fundamentus.com.br/detalhes.php?papel="
  
          # Request
          agent = {"User-Agent": "Mozilla/5.0"}
          page = requests.get(url, headers=agent, timeout=None)
  
          # BeautifulSoup
          soup = BeautifulSoup(page.content, "html.parser")
          tbody = soup.find("tbody")
  
          children = tbody.findChildren("a", recursive=True)
          for child in children:
              _symbols.append(
                  str(child)
                  .rsplit('"', maxsplit=1)[-1]
                  .split(">")[1]
                  .split("<")[0]
              )
  
          return _symbols
  
      if _BR_SYMBOLS is None:
          _all_symbols = _get_ibovespa()
          if qlib_data_path is not None:
              for _index in ["ibov"]:
                  ins_df = pd.read_csv(
                      Path(qlib_data_path).joinpath(
                          f"instruments/{_index}.txt"
                      ),
                      sep="\t",
                      names=["symbol", "start_date", "end_date"],
                  )
                  _all_symbols += ins_df["symbol"].unique().tolist()
  
          def _format(s_):
              s_ = s_.strip()
              s_ = s_.strip("$")
              s_ = s_.strip("*")
              s_ = s_ + ".SA"
              return s_
  
          _BR_SYMBOLS = sorted(set(map(_format, _all_symbols)))
  
      return _BR_SYMBOLS
  
imports: import re
  import copy
  import importlib
  import time
  import bisect
  import pickle
  import random
  import requests
  import functools
  from pathlib import Path
  from typing import Iterable, Tuple, List
  import numpy
  import pandas
  from lxml import etree
  from loguru import logger
  from yahooquery import Ticker
  from tqdm import tqdm
  from functools import partial
  from concurrent.futures import ProcessPoolExecutor
  from bs4 import BeautifulSoup
label_desc: Use image node_id 7 for calling a global function with example usage: get_br_stock_symbols(qlib_data_path) and returns: _BR_SYMBOLS, _symbols, s_