code: def calculate_target_value(
      self, model_type, i, grid, feat_type, cls_idx
  ):
      if model_type == "regression":
          target_value = i if feat_type == "onehot" else grid
      elif model_type == "binary":
          target_value = (
              (i + 1) / self.data_gen.DUMMY_ONEHOT_LENGTH
              if feat_type == "onehot"
              else 1
          )
      elif model_type == "multi-class":
          if feat_type == "onehot":
              pos_value = (i + 1) / self.data_gen.DUMMY_ONEHOT_LENGTH
              target_value = (
                  pos_value
                  if cls_idx == 0
                  else (1 - pos_value)
                  / (self.data_gen.DUMMY_MULTI_CLASSES - 1)
              )
          else:
              target_value = 1 if cls_idx == 0 else 0
      return target_value
  
imports: import numpy
  import pytest
  import copy
  from abc import abstractmethod
  from pdpbox.pdp import PDPResult, PDPIsolate, PDPInteract
  from pdpbox.utils import FeatureInfo, _make_list
  from conftest import DummyModel, PlotTestBase
label_desc: Use image node_id 3 for calling the TestPDPIsolate obj's underlying member method code with example usage: obj.calculate_target_value(model_type, i, grid, feat_type, cls_idx) and returns: target_value