code: def save_exchange_symbols(exchange_name, assets, is_local=False):
      """
      Save assets into an exchange_symbols file.
  
      Parameters
      ----------
      exchange_name: str
      assets: list[dict[str, object]]
      is_local: bool
      environ
  
      Returns
      -------
  
      """
      asset_dicts = dict()
      for symbol in assets:
          asset_dicts[symbol] = assets[symbol].to_dict()
  
      filename = get_exchange_symbols_filename(exchange_name, is_local)
      with open(filename, "wt") as handle:
          json.dump(
              asset_dicts, handle, indent=4, default=symbols_serial
          )
  
imports: import hashlib
  import json
  import os
  import pickle
  import shutil
  from datetime import date, datetime
  import pandas
  from catalyst.assets._assets import TradingPair
  from six import string_types
  from six.moves.urllib import request
  from catalyst.constants import DATE_FORMAT, SYMBOLS_URL
  from catalyst.exchange.exchange_errors import ExchangeSymbolsNotFound
  from catalyst.exchange.utils.serialization_utils import ExchangeJSONEncoder, ExchangeJSONDecoder
  from catalyst.utils.memoize import weak_lru_cache
  from catalyst.utils.paths import data_root, ensure_directory, last_modified_time
label_desc: Use image node_id 8 for calling a global function with example usage: save_exchange_symbols(exchange_name, assets, is_local) without return types