code: func (g *Cloud) InstanceType(ctx context.Context, nodeName types.NodeName) (string, error) {
  	instanceName := mapNodeNameToInstanceName(nodeName)
  	if g.useMetadataServer {
  		// Use metadata, if possible, to fetch ID. See issue #12000
  		if g.isCurrentInstance(instanceName) {
  			mType, err := getCurrentMachineTypeViaMetadata()
  			if err == nil {
  				return mType, nil
  			}
  		}
  	}
  	instance, err := g.getInstanceByName(instanceName)
  	if err != nil {
  		return "", err
  	}
  	return instance.Type, nil
  }
docs: // InstanceType returns the type of the specified node with the specified NodeName.