import tensorflow as tf

def _get_features_dict(input_dict):
  """Extracts features dict from input dict."""

  source_id = _replace_empty_string_with_random_number(
    input_dict[fields.InputDataFields.source_id])

  hash_from_source_id = tf.string_to_hash_bucket_fast(source_id, HASH_BINS)
  features = {
    fields.InputDataFields.image:
      input_dict[fields.InputDataFields.image],
    HASH_KEY: tf.cast(hash_from_source_id, tf.int32),
    fields.InputDataFields.true_image_shape:
