def METHOD_NAME(cls, ctx, op: "LGBMPredict"):
    in_data = ctx[op.data.key]
    in_data = in_data.spmatrix if hasattr(in_data, "spmatrix") else in_data
    out = op.outputs[0]
    if op.data.shape[0] == 0:
        result = np.array([])
    elif op.proba:
        result = op.model.predict_proba(in_data, **op.kwds)
    else:
        result = op.model.predict(in_data, **op.kwds)
    if op.output_types[0] == OutputType.dataframe:
        result = pd.DataFrame(
            result, index=in_data.index, columns=out.columns_value.to_pandas()
        )
    elif op.output_types[0] == OutputType.series:
        result = pd.Series(result, index=in_data.index, name="predictions")
    ctx[out.key] = result