def validate_instance(params):
    if platform.system() == 'Linux':
        if 'Ubuntu' in platform.linux_distribution()[0]:
            params.system = Ubuntu(params)
        if platform.linux_distribution()[0] in 'Red Hat Enterprise Linux Server':
            params.system = RHEL(params)
    elif platform.system() == 'Windows':
        params.system = Windows(params)
    if 'system' not in params:
        raise RuntimeError(
            System.UNSUPPORTED_SYSTEM_MSG
        )
    try:
        urlopen('http://169.254.169.254/latest/meta-data/', timeout=1)
        raise RuntimeError('Amazon EC2 instances are not supported.')
    except (URLError, timeout):
        pass
dataset/ETHPy150Open aws/aws-cli/awscli/customizations/codedeploy/utils.py/validate_instance/swapped operands of `in`