@staticmethod
    def is_valid_body(body, entity_name):
        if not (body and body in entity_name):
            return False

        def is_dict(d):
            try:
                d.get(None)
                return True
            except AttributeError:
                return False

        return is_dict(body[entity_name])
dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/api/openstack/wsgi.py/Controller.is_valid_body/swapped operands of `in`