code: def to_dist_df(
      ctx, sample_id_name, match_id_name, result_df: pd.DataFrame
  ):
      if LABEL in result_df:
          reader = PandasReader(
              sample_id_name=sample_id_name,
              match_id_name=match_id_name,
              label_name=LABEL,
              dtype="object",
          )
      else:
          reader = PandasReader(
              sample_id_name=sample_id_name,
              match_id_name=match_id_name,
              dtype="object",
          )
      data = reader.to_frame(ctx, result_df)
      return data
  
file_path: FATE/python/fate/ml/utils/predict_tools.py
imports: import json
  from typing import Literal
  import numpy
  import pandas
  from fate.arch.dataframe import DataFrame
  from fate.arch.dataframe import PandasReader
label_desc: Use image node_id 3 for calling a global function with example usage: to_dist_df(ctx, sample_id_name, match_id_name, result_df) and returns: data