def METHOD_NAME(
    shareable: Shareable, params_converter: Optional[ParamsConverter] = None, fl_ctx: Optional[FLContext] = None
) -> FLModel:
    """From NVFlare side shareable to FLModel.
    This is a temporary solution to converts the shareable of existing style to FLModel,
    so that we can reuse the existing components we have.
    In the future, we should be using the to_dxo, from_dxo directly.
    And all the components should be changed to accept the standard DXO.
    """
    dxo = METHOD_NAME(shareable)
    metrics = None
    params_type = None
    params = None
    if dxo.data_kind == DataKind.METRICS:
        metrics = dxo.data
    else:
        params_type = data_kind_to_params_type.get(dxo.data_kind)
        if params_type is None:
            raise ValueError(f"Invalid shareable with dxo that has data kind: {dxo.data_kind}")
        params_type = ParamsType(params_type)
        if params_converter:
            dxo.data = params_converter.convert(dxo.data)
        params = dxo.data
    current_round = shareable.get_header(AppConstants.CURRENT_ROUND, None)
    total_rounds = shareable.get_header(AppConstants.NUM_ROUNDS, None)
    validate_type = shareable.get_header(AppConstants.VALIDATE_TYPE, None)
    meta = dict(dxo.meta)
    if validate_type is not None:
        meta[MetaKey.VALIDATE_TYPE] = validate_type
    if fl_ctx is not None:
        meta[MetaKey.JOB_ID] = fl_ctx.get_job_id()
        meta[MetaKey.SITE_NAME] = fl_ctx.get_identity_name()
    result = FLModel(
        params_type=params_type,
        params=params,
        metrics=metrics,
        current_round=current_round,
        total_rounds=total_rounds,
        meta=meta,
    )
    return result