code: def arrange(df, *args, **kwargs):
      
  
      flat_args = [a for a in flatten(args)]
  
      series = [df[arg] if isinstance(arg, str) else
                df.iloc[:, arg] if isinstance(arg, int) else
                pd.Series(arg) for arg in flat_args]
  
      sorter = pd.concat(series, axis=1).reset_index(drop=True)
      sorter = sorter.sort_values(sorter.columns.tolist(), **kwargs)
      return df.iloc[sorter.index, :]
docs: Calls `pandas.DataFrame.sort_values` to sort a DataFrame according to
      criteria.
  
      See:
      http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.sort_values.html
  
      For a list of specific keyword arguments for sort_values (which will be
      the same in arrange).
  
      Args:
          *args: Symbolic, string, integer or lists of those types indicating
              columns to sort the DataFrame by.
  
      Kwargs:
          **kwargs: Any keyword arguments will be passed through to the pandas
              `DataFrame.sort_values` function.