<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def encode_all_features(dataset, vocabulary):
 """Encode all features. Args: dataset: a tf.data.Dataset vocabulary: a vocabulary.Vocabulary Returns: a tf.data.Dataset """

  def my_fn(features):
    ret = {}
    for k, v in features.items():
      v = vocabulary.encode_tf(v)
      v = tf.concat([tf.to_int64(v), [1]], 0)
      ret[k] = v
    return ret
  return dataset.map(my_fn, num_parallel_calls=tf.data.experimental.AUTOTUNE)