code: def sort_dataframe(df, order_by: list):
      cols = []
      ascending = []
      for order in order_by:
          if not isinstance(order, ast.OrderBy):
              continue
  
          col = order.field.parts[-1]
          if col not in df.columns:
              continue
  
          cols.append(col)
          ascending.append(
              False if order.direction.lower() == "desc" else True
          )
      if len(cols) > 0:
          df = df.sort_values(by=cols, ascending=ascending)
      return df
  
file_path: mindsdb/mindsdb/integrations/utilities/sql_utils.py
imports: import pandas
  from mindsdb.api.executor.utilities.sql import query_df
  from mindsdb_sql.parser import ast
  from mindsdb_sql.parser.ast.base import ASTNode
  from mindsdb_sql.planner.utils import query_traversal
label_desc: Use image node_id 6 for calling a global function with example usage: sort_dataframe(df, order_by) and returns: df