code: def attach_periodic(plot):
      
      def append_refresh(dmap):
          for dmap in get_nested_dmaps(dmap):
              dmap.periodic._periodic_util = periodic(plot.document)
      return plot.hmap.traverse(append_refresh, [DynamicMap])
docs: Attaches plot refresh to all streams on the object.