One-liner for you: return net_name in self.design.data['nets']