code: def extract_task_specific(instance, task_name):
      output = instance
      if isinstance(instance, dict):
          return instance[task_name]
      return output
  
imports: import collections
  import functools
  import inspect
  from absl import logging
  from model_search import block_builder
  from model_search import ensembler
  from model_search.architecture import architecture_utils
  from model_search.architecture import tower
  from model_search.ensembler import EnsembleLogits
  from model_search.generators import base_tower_generator
  from model_search.generators import trial_utils
  from model_search.meta import distillation
  import numpy
  import tensorflow.compat.v2
label_desc: Use image node_id 1 for calling a global function with example usage: extract_task_specific(instance, task_name) and returns: output, instance