code: def create_id_card_data(
      selected_row: pd.DataFrame,
      selected_contrib: pd.DataFrame,
      sort_by: str,
      order: bool,
      special_cols: list,
      additional_features_dict: dict,
  ) -> pd.DataFrame:
      """Merge and sort features and contributions dataframes for the identity card.
  
      Parameters
      ----------
      selected_row : pd.DataFrame
          Dataframe of the features
      selected_contrib : pd.DataFrame
          Dataframe of the contributions
      sort_by : str
          Column to sort by
      order : bool
          Ascending or descending order
      special_cols : list
          Sepcial columns about the index, the prediction...
      additional_features_dict : dict
          Dictionary mapping technical feature names to domain names for additional data
  
      Returns
      -------
      pd.DataFrame
          Dataframe of the data for the identity card
      """
      selected_data = selected_row.merge(
          selected_contrib, how="left", on="feature_name"
      )
      selected_data.index = selected_row.index
      selected_data = pd.concat(
          [
              selected_data.loc[special_cols],
              selected_data.drop(
                  index=special_cols
                  + list(additional_features_dict.keys())
              ).sort_values(sort_by, ascending=order),
              selected_data.loc[
                  list(additional_features_dict.keys())
              ].sort_values(sort_by, ascending=order),
          ]
      )
  
      return selected_data
  
imports: from typing import Optional, Tuple
  import numpy
  import pandas
  import datetime
  from dash import dcc, html
  import dash_bootstrap_components
label_desc: Use image node_id 16 for calling a global function with example usage: create_id_card_data(selected_row, selected_contrib, sort_by, order, special_cols, additional_features_dict) and returns: selected_data