def validate(self):
        if self.resource in 'UpdatePolicy':
            update_policy = self.resource['UpdatePolicy']

            if 'AutoScalingRollingUpdate' in update_policy.properties:
                rolling_update = update_policy.AutoScalingRollingUpdate

                isMinNoCheck = isinstance(
                    rolling_update.MinInstancesInService,
                    (FindInMap, Ref)
                )
                isMaxNoCheck = isinstance(self.MaxSize, (If, FindInMap, Ref))

                if not (isMinNoCheck or isMaxNoCheck):
                    maxCount = int(self.MaxSize)
                    minCount = int(rolling_update.MinInstancesInService)

                    if minCount >= maxCount:
                        raise ValueError(
                            "The UpdatePolicy attribute "
                            "MinInstancesInService must be less than the "
                            "autoscaling group's MaxSize")

        launch_config = self.properties.get('LaunchConfigurationName')
        instance_id = self.properties.get('InstanceId')
        if launch_config and instance_id:
            raise ValueError("LaunchConfigurationName and InstanceId "
                             "are mutually exclusive.")
        if not launch_config and not instance_id:
            raise ValueError("Must specify either LaunchConfigurationName or "
                             "InstanceId: http://docs.aws.amazon.com/AWSCloud"
                             "Formation/latest/UserGuide/aws-properties-as-gr"
                             "oup.html#cfn-as-group-instanceid")

        availability_zones = self.properties.get('AvailabilityZones')
        vpc_zone_identifier = self.properties.get('VPCZoneIdentifier')
        if not availability_zones and not vpc_zone_identifier:
            raise ValueError("Must specify AvailabilityZones and/or "
                             "VPCZoneIdentifier: http://docs.aws.amazon.com/A"
                             "WSCloudFormation/latest/UserGuide/aws-propertie"
                             "s-as-group.html#cfn-as-group-vpczoneidentifier")
        return True
dataset/ETHPy150Open cloudtools/troposphere/troposphere/autoscaling.py/AutoScalingGroup.validate/swapped operands of `in`