def get_node(self, aws_type, node_name, generation_id, is_running=1):
        matching_nodes = InfrastructureNode.objects.filter(
            deployment_name=self.deployment_name,
            generation_id=generation_id,
            aws_type=aws_type,
            name=node_name,
            is_running=is_running,
        )
        if len(matching_nodes) > 1:
            raise Exception('More than one matching node')
        elif len(matching_nodes) == 1:
            node = matching_nodes[0]
            node.set_aws_conns(self.ec2conn, self.rdsconn)
            node.set_deployment_info(
                self.deployment_confs[node.aws_type][node.name])
            return node
        else:
            return None
dataset/ETHPy150Open winhamwr/neckbeard/neckbeard/environment_manager.py/Deployment.get_node/original