code: def _compute_score_samples(instance, estimator):
      leaves_index = estimator.apply(instance)
      node_indicator = estimator.decision_path(instance)
      n_samples_leaf = estimator.tree_.n_node_samples[leaves_index]
  
      return (
          np.ravel(node_indicator.sum(axis=1))
          + _average_path_length(n_samples_leaf)
          - 1.0
      )
  
imports: import numbers
  import warnings
  from typing import Union
  import numpy
  from sklearn.base import OutlierMixin
  from sklearn.tree import ExtraTreeRegressor
  from sklearn.utils import check_array, gen_batches
  from ...None import tensor
  from ...lib.sparse import issparse
  from ...session import execute
  from ...tensor.utils import check_random_state
  from ..utils import get_chunk_n_rows, convert_to_tensor_or_dataframe
  from ..utils.validation import _num_samples, check_is_fitted
  from ._bagging import BaseBagging, BaggingPredictionOperand, PredictionType
label_desc: Use image node_id 3 for calling a global function with example usage: _compute_score_samples(instance, estimator) and returns: unknown