code: def save_algo_object(
      algo_name, key, obj, environ=None, rel_path=None, how="pickle"
  ):
      """
      Serialize and save an object by algo name and key.
  
      Parameters
      ----------
      algo_name: str
      key: str
      obj: Object
      environ:
      rel_path: str
      how: str
  
      """
      folder = get_algo_folder(algo_name, environ)
  
      if rel_path is not None:
          folder = os.path.join(folder, rel_path)
          ensure_directory(folder)
  
      if how == "json":
          filename = os.path.join(folder, "{}.json".format(key))
          with open(filename, "wt") as handle:
              json.dump(obj, handle, indent=4, cls=ExchangeJSONEncoder)
  
      else:
          filename = os.path.join(folder, "{}.p".format(key))
          with open(filename, "wb") as handle:
              pickle.dump(obj, handle, protocol=pickle.HIGHEST_PROTOCOL)
  
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 15 for calling a global function with example usage: save_algo_object(algo_name, key, obj, environ, rel_path, how) without return types