def _get_sstable_proto_dict(*input_values):
  """Returns table key -> serialized proto map.

  This function exists because the create_parse_tf_example_fn operates on
    dequeued batches which could be 1-tuples or 2-tuples or dictionaries.

  Args:
    *input_values: A (string tensor,) tuple if mapping from a RecordIODataset or
      TFRecordDataset, or a (key, string tensor) tuple if mapping from a
      SSTableDataset, or (Dict[dataset_key, values],) if mapping from multiple
      datasets.

  Returns:
    dict_extracted: dictionary mapping each sstable (or '' for singular) to the
      batch of string tensors for the corresponding serialized protos.
  """
  dict_extracted = {}
  if isinstance(input_values[0], dict):
    for key, serialized_proto in input_values[0].items():
      if isinstance(serialized_proto, tuple):
        # Assume an SSTable key, value pair.
        _, dict_extracted[key] = serialized_proto
      else:
        dict_extracted[key] = serialized_proto
  else:
    if len(input_values) == 2:
      _, dict_extracted[''] = input_values
    else:
      dict_extracted[''], = input_values
  return dict_extracted