code: func (r *Registry) FindByName(name string, refs []types.ManagedObjectReference) mo.Entity {
  	for _, ref := range refs {
  		if e, ok := r.Get(ref).(mo.Entity); ok {
  			if name == e.Entity().Name {
  				return e
  			}
  		}
  	}
  
  	return nil
  }
docs: // FindByName returns the first mo.Entity of the given refs whose Name field is equal to the given name.
  // If there is no match, nil is returned.
  // This method is useful for cases where objects are required to have a unique name, such as Datastore with
  // a HostStorageSystem or HostSystem within a ClusterComputeResource.