code: def extract_orders(perf):
      order_list = perf.orders.values
      all_orders = [t for sublist in order_list for t in sublist]
      all_orders.sort(key=lambda o: o["dt"])
  
      orders = pd.DataFrame(all_orders)
      if not orders.empty:
          orders.set_index("dt", inplace=True, drop=True)
      return orders
  
imports: import copy
  import csv
  import json
  import numbers
  import os
  import time
  import numpy
  import pandas
  from catalyst.assets._assets import TradingPair
  from catalyst.exchange.utils.exchange_utils import get_algo_folder
  from catalyst.utils.paths import data_root, ensure_directory
  from operator import itemgetter
label_desc: Use image node_id 14 for calling a global function with example usage: extract_orders(perf) and returns: orders