def summarize_stocks(transactions_dict):
    """
    calculates total number of shares for each company
    based on transactions dictionary
    """
    stocks_summarized = {}
    for t in transactions_dict:
        if t["symbol"] not in stocks_summarized:
            stocks_summarized[t["symbol"]] = t["quantity"]
        else:
            stocks_summarized[t["symbol"]] += t["quantity"]
    return stocks_summarized