code: func (as *availabilitySet) GetPowerStatusByNodeName(name string) (powerState string, err error) {
  	vm, err := as.getVirtualMachine(types.NodeName(name))
  	if err != nil {
  		return powerState, err
  	}
  
  	if vm.InstanceView != nil && vm.InstanceView.Statuses != nil {
  		statuses := *vm.InstanceView.Statuses
  		for _, status := range statuses {
  			state := to.String(status.Code)
  			if strings.HasPrefix(state, vmPowerStatePrefix) {
  				return strings.TrimPrefix(state, vmPowerStatePrefix), nil
  			}
  		}
  	}
  
  	return "", fmt.Errorf("failed to get power status for node %q", name)
  }
docs: // GetPowerStatusByNodeName returns the power state of the specified node.