code: func (l *legacyInstance) FromInstance(inst *api.Instance) *legacyInstance {
  	l.PackageName = inst.Package
  	l.InstanceID = common.ObjectRefToInstanceID(inst.Instance)
  	l.RegisteredBy = inst.RegisteredBy
  	if ts := inst.RegisteredTs; ts != nil {
  		l.RegisteredTs = fmt.Sprintf("%d", ts.Seconds*1e6+int64(ts.Nanos/1e3))
  	} else {
  		l.RegisteredTs = ""
  	}
  	return l
  }
docs: // FromInstance fills in legacyInstance based on data from Instance proto.