code: def predict_base(
      model, data, session=None, run_kwargs=None, run=True, **kwargs
  ):
      from lightgbm import LGBMModel
  
      if not isinstance(model, LGBMModel):
          raise TypeError(
              f"model has to be a lightgbm.LGBMModel, got {type(model)} instead"
          )
      model = model.to_local() if hasattr(model, "to_local") else model
  
      proba = kwargs.pop("proba", hasattr(model, "classes_"))
  
      if isinstance(data, TENSOR_TYPE):
          output_types = [OutputType.tensor]
      elif proba:
          output_types = [OutputType.dataframe]
      else:
          output_types = [OutputType.series]
  
      op = LGBMPredict(
          data=data,
          model=model,
          gpu=data.op.gpu,
          output_types=output_types,
          proba=proba,
          kwds=kwargs,
      )
      result = op()
      if run:
          result.execute(session=session, **(run_kwargs or dict()))
      return result
  
imports: import pickle
  import numpy
  import pandas
  from ....None import opcodes
  from ....core import recursive_tile
  from ....dataframe.utils import parse_index
  from ....serialization.serializables import BoolField, BytesField, DictField, KeyField
  from ....tensor.core import TENSOR_TYPE, TensorOrder
  from ...operands import LearnOperand, LearnOperandMixin, OutputType
label_desc: Use image node_id 1 for calling a global function with example usage: predict_base(model, data, session, run_kwargs, run) and returns: result