code: def output_df(df, assets, name=None):
      """
      Outputs a price DataFrame to a temp folder.
  
      Parameters
      ----------
      df: pd.DataFrame
      assets
      name
  
      Returns
      -------
  
      """
      if isinstance(assets, TradingPair):
          asset_folder = "{}_{}".format(assets.exchange, assets.symbol)
      else:
          asset_folder = ",".join(
              ["{}_{}".format(a.exchange, a.symbol) for a in assets]
          )
  
      folder = os.path.join(
          tempfile.gettempdir(), "catalyst", asset_folder
      )
      ensure_directory(folder)
  
      if name is None:
          name = "output"
  
      path = os.path.join(folder, "{}.csv".format(name))
      df.to_csv(path)
  
      return path, folder
  
file_path: catalyst/catalyst/exchange/utils/test_utils.py
imports: import os
  import random
  import tempfile
  from catalyst.assets._assets import TradingPair
  from catalyst.exchange.exchange_bundle import ExchangeBundle
  from catalyst.exchange.utils.exchange_utils import get_exchange_folder
  from catalyst.exchange.utils.factory import find_exchanges
  from catalyst.utils.paths import ensure_directory
label_desc: Use image node_id 4 for calling a global function with example usage: output_df(df, assets, name) and returns: path,  folder