code: def attach_streams(plot, obj, precedence=1.1):
      
      def append_refresh(dmap):
          for stream in get_nested_streams(dmap):
              if plot.refresh not in stream._subscribers:
                  stream.add_subscriber(plot.refresh, precedence)
      return obj.traverse(append_refresh, [DynamicMap])
docs: Attaches plot refresh to all streams on the object.