code: def _get_func(
      self,
      find_scores_layers,
      target_layer,
      input_layers,
      func_type,
      slice_objects=None,
  ):
      if isinstance(find_scores_layers, list) == False:
          remove_list_wrapper_on_return = True
          find_scores_layers = [find_scores_layers]
      else:
          remove_list_wrapper_on_return = False
      for find_scores_layer in find_scores_layers:
          find_scores_layer.reset_mxts_updated()
      self._set_scoring_mode_for_target_layer(target_layer)
      for find_scores_layer in find_scores_layers:
          find_scores_layer.update_mxts()
      if func_type == FuncType.contribs:
          output_symbolic_vars = [
              find_scores_layer.get_target_contrib_vars()
              for find_scores_layer in find_scores_layers
          ]
      elif func_type == FuncType.multipliers:
          output_symbolic_vars = [
              find_scores_layer.get_mxts()
              for find_scores_layer in find_scores_layers
          ]
      elif func_type == FuncType.contribs_of_input_with_filter_refs:
          output_symbolic_vars = [
              find_scores_layer.get_contribs_of_inputs_with_filter_refs()
              for find_scores_layer in find_scores_layers
          ]
      else:
          raise RuntimeError("Unsupported func_type: " + func_type)
      if slice_objects is not None:
          output_symbolic_vars = output_symbolic_vars[slice_objects]
      core_function = compile_func(
          [
              input_layer.get_activation_vars()
              for input_layer in input_layers
          ]
          + [
              input_layer.get_reference_vars()
              for input_layer in input_layers
          ],
          output_symbolic_vars,
      )
  
      def func(
          task_idx,
          input_data_list,
          batch_size,
          progress_update,
          input_references_list=None,
      ):
          if isinstance(input_data_list, dict):
              assert hasattr(self, "_input_layer_names"), (
                  "Dictionary supplied for input_data_list but model does "
                  "not have an attribute '_input_layer_names"
              )
              input_data_list = [
                  input_data_list[x] for x in self._input_layer_names
              ]
          if input_references_list is None:
              print("No reference provided - using zeros")
              input_references_list = [0.0 for x in input_data_list]
          if isinstance(input_references_list, dict):
              assert hasattr(self, "_input_layer_names"), (
                  "Dictionary supplied for input_references_list but model "
                  "does not have an attribute '_input_layer_names"
              )
              input_references_list = [
                  input_references_list[x]
                  for x in self._input_layer_names
              ]
          input_references_list = [
              np.ones_like(input_data) * reference
              for (input_data, reference) in zip(
                  input_data_list, input_references_list
              )
          ]
          # WARNING: this is not thread-safe. Do not try to
          # parallelize or you can end up with multiple target_layers
          # active at once
          target_layer.update_task_index(task_idx)
          target_layer.set_active()
          to_return = deeplift.util.run_function_in_batches(
              func=core_function,
              input_data_list=input_data_list + input_references_list,
              batch_size=batch_size,
              progress_update=progress_update,
              multimodal_output=True,
          )
          target_layer.set_inactive()
          if remove_list_wrapper_on_return:
              # remove the enclosing []; should be only one element
              assert len(to_return) == 1
              to_return = to_return[0]
          return to_return
  
      return func
  
imports: from __future__ import division
  from __future__ import print_function
  from __future__ import absolute_import
  import sys
  import os
  import numpy
  import yaml
  from collections import namedtuple
  from collections import OrderedDict
  from collections import defaultdict
  import deeplift.util
  from deeplift import layers
  from deeplift.layers import *
  from deeplift.layers import ScoringMode
  from deeplift.util import compile_func
label_desc: Use image node_id 3 for calling the Model obj's underlying member method code with example usage: obj._get_func(find_scores_layers, target_layer, input_layers, func_type, slice_objects) and returns: func, to_return