code: func AttemptIDFromKey(k *ds.Key) *dm.Attempt_ID {
  	if k.Kind() != "Attempt" || k.Parent() != nil {
  		panic(fmt.Errorf("invalid Attempt key: %s", k))
  	}
  	ret := &dm.Attempt_ID{}
  	if err := ret.SetDMEncoded(k.StringID()); err != nil {
  		panic(fmt.Errorf("invalid Attempt key: %s: %s", k, err))
  	}
  	return ret
  }
docs: // AttemptIDFromKey makes a AttemptID from the given datastore.Key. It panics if the
  // Key does not point to a Attempt.