code: def _check_and_coerce_cfg_value_type(value_a, value_b, key, full_key):
      """Checks that `value_a`, which is intended to replace `value_b` is of the
      right type. The type is correct if it matches exactly or is one of a few
      cases in which the type can be easily coerced.
      """
      # The types must match (with some exceptions)
      type_b = type(value_b)
      type_a = type(value_a)
      if type_a is type_b:
          return value_a
  
      # Exceptions: numpy arrays, strings, tuple<->list
      if isinstance(value_b, np.ndarray):
          value_a = np.array(value_a, dtype=value_b.dtype)
      elif isinstance(value_b, basestring):
          value_a = str(value_a)
      elif isinstance(value_a, tuple) and isinstance(value_b, list):
          value_a = list(value_a)
      elif isinstance(value_a, list) and isinstance(value_b, tuple):
          value_a = tuple(value_a)
      else:
          raise ValueError(
              "Type mismatch ({} vs. {}) with values ({} vs. {}) for config "
              "key: {}".format(
                  type_b, type_a, value_b, value_a, full_key
              )
          )
      return value_a
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  from ast import literal_eval
  from future.utils import iteritems
  from past.builtins import basestring
  import copy
  import logging
  import numpy
  import os
  import os.path
  import yaml
  from detectron.utils.collections import AttrDict
  from detectron.utils.io import cache_url
label_desc: Use image node_id 13 for calling a global function with example usage: _check_and_coerce_cfg_value_type(value_a, value_b, key, full_key) and returns: value_a, value_a