code: func BaseFromReference(client *govmomi.Client, ref types.ManagedObjectReference) (BaseComputeResource, error) {
  	switch ref.Type {
  	case "ComputeResource":
  		return StandaloneFromID(client, ref.Value)
  	case "ClusterComputeResource":
  		return StandaloneFromID(client, ref.Value)
  	}
  	return nil, fmt.Errorf("unknown object type %s", ref.Type)
  }
docs: // BaseFromReference returns a BaseComputeResource for a given managed object
  // reference.