code: def get_position_data(
      position: dict,
      label_data: pd.DataFrame,
      report_normal: pd.DataFrame = None,
      calculate_label_rank=False,
      start_date=None,
      end_date=None,
  ) -> pd.DataFrame:
      """Concat position data with pred/report_normal
  
      :param position: position data
      :param report_normal: report normal, must be container 'bench' column
      :param label_data:
      :param calculate_label_rank:
      :param start_date: start date
      :param end_date: end date
      :return: concat result,
          columns: ['amount', 'cash', 'count', 'price', 'status', 'weight', 'label',
                      'rank_ratio', 'rank_label_mean', 'excess_return', 'score', 'bench']
          index: ['instrument', 'date']
      """
      _position_df = parse_position(position)
  
      # Add custom_label, rank_ratio, rank_mean, and excess_return field
      _position_df = _add_label_to_position(_position_df, label_data)
  
      if calculate_label_rank:
          _position_df = _calculate_label_rank(_position_df)
  
      if report_normal is not None:
          # Add bench field
          _position_df = _add_bench_to_position(
              _position_df, report_normal["bench"]
          )
  
      _date_list = _position_df.index.get_level_values(level="datetime")
      start_date = (
          _date_list.min() if start_date is None else start_date
      )
      end_date = _date_list.max() if end_date is None else end_date
      _position_df = _position_df.loc[
          (start_date <= _date_list) & (_date_list <= end_date)
      ]
      return _position_df
  
imports: import pandas
  from ....backtest.profit_attribution import get_stock_weight_df
label_desc: Use image node_id 5 for calling a global function with example usage: get_position_data(position, label_data, report_normal, calculate_label_rank, start_date, end_date) and returns: _position_df