code: func (r *Resource) Clone() *Resource {
  	res := &Resource{
  		MilliCPU:         r.MilliCPU,
  		Memory:           r.Memory,
  		AllowedPodNumber: r.AllowedPodNumber,
  		EphemeralStorage: r.EphemeralStorage,
  	}
  	if r.ScalarResources != nil {
  		res.ScalarResources = make(map[v1.ResourceName]int64)
  		for k, v := range r.ScalarResources {
  			res.ScalarResources[k] = v
  		}
  	}
  	return res
  }
docs: // Clone returns a copy of this resource.