code: def convert_dict_to_compatible_tensor(values, targets):
      """Converts dict `values` in tensors that are compatible with `targets`.
  
      Args:
        values: A dict to objects to convert with same keys as `targets`.
        targets: A dict returned by `parse_tensor_info_map`.
  
      Returns:
        A map with the same keys as `values` but values converted into
        Tensor/CompositeTensor that can be fed into `protomap`.
  
      Raises:
        TypeError: If it fails to convert.
      """
      result = {}
      for key, value in sorted(values.items()):
          result[key] = _convert_to_compatible_tensor(
              value, targets[key], error_prefix="Can't convert %r" % key
          )
      return result
  
imports: import tensorflow
  from tensorflow_hub import tf_utils
label_desc: Use image node_id 5 for calling a global function with example usage: convert_dict_to_compatible_tensor(values, targets) and returns: result