code: def _add_label_to_position(
      position_df: pd.DataFrame, label_data: pd.DataFrame
  ) -> pd.DataFrame:
      """Concat position with custom label
  
      :param position_df: position DataFrame
      :param label_data:
      :return: concat result
      """
  
      _start_time = position_df.index.get_level_values(
          level="datetime"
      ).min()
      _end_time = position_df.index.get_level_values(
          level="datetime"
      ).max()
      label_data = label_data.loc(axis=0)[
          :, pd.to_datetime(_start_time) :
      ]
      _result_df = pd.concat(
          [position_df, label_data], axis=1, sort=True
      ).reindex(label_data.index)
      _result_df = _result_df.loc[
          _result_df.index.get_level_values(1) <= _end_time
      ]
      return _result_df
  
imports: import pandas
  from ....backtest.profit_attribution import get_stock_weight_df
label_desc: Use image node_id 2 for calling a global function with example usage: _add_label_to_position(position_df, label_data) and returns: _result_df