code: def addStock(self, ticker, company, sector, industry):
      symbolElement = etree.Element("symbol")
      symbolElement.set("ticker", ticker)
      symbolElement.set("name", company)
      symbolElement.set("type", "stock")
      if sector is None:
          sector = ""
      symbolElement.set("sector", sector)
      if industry is None:
          industry = ""
      symbolElement.set("industry", industry)
      self.__root.append(symbolElement)
  
file_path: pyalgotrade/tools/symbols/symbolsxml.py
imports: from lxml import etree
label_desc: Use image node_id 2 for calling the Writer obj's underlying member method code with example usage: obj.addStock(ticker, company, sector, industry) without return types