docs: def serialize_example(transformed_json_data, info_dict):
    """Makes a serialized tf.example.
  
    Args:
      transformed_json_data: dict of transformed data.
      info_dict: output of feature_transforms.get_transfrormed_feature_info()
  
    Returns:
      The serialized tf.example version of transformed_json_data.
    """
    import six
    import tensorflow as tf
  
    def _make_int64_list(x):
      return tf.train.Feature(int64_list=tf.train.Int64List(value=x))
    def _make_bytes_list(x):
      return tf.train.Feature(bytes_list=tf.train.BytesList(value=x))
    def _make_float_list(x):
      return tf.train.Feature(float_list=tf.train.FloatList(value=x))
  
    if sorted(six.iterkeys(transformed_json_data)) != sorted(six.iterkeys(info_dict)):
      raise ValueError('Keys do not match %s, %s' % (list(six.iterkeys(transformed_json_data)),
                       list(six.iterkeys(info_dict))))
  
    ex_dict = {}
    for name, info in six.iteritems(info_dict):
      if info['dtype'] == tf.int64:
        ex_dict[name] = _make_int64_list(transformed_json_data[name])
      elif info['dtype'] == tf.float32:
        ex_dict[name] = _make_float_list(transformed_json_data[name])
      elif info['dtype'] == tf.string:
        ex_dict[name] = _make_bytes_list(transformed_json_data[name])      
      else:
        raise ValueError('Unsupported data type %s' % info['dtype'])
  
    ex = tf.train.Example(features=tf.train.Features(feature=ex_dict))
    return ex.SerializeToString()