code: def purge_node(self, node_id, remove_definition=False, sandbox=None):
          
          for stream_id in list(self.streams):
              stream = self.streams[stream_id]
              if not stream.parent_node:
                  # This can happen if streams have been defined outside of nodes - generally nothing to worry about
                  logging.debug("cannot purge the stream with id {} because it has no parent node".format(stream_id))
                  continue
              if stream.parent_node.node_id == node_id:
                  self.purge_stream(stream_id, remove_definition=remove_definition, sandbox=sandbox)
docs: Purges a node (collection of streams)
  
          :param node_id: The node identifier
          :param remove_definition: Whether to remove the stream definition as well
          :param sandbox: The sandbox
          :return: None