code: def from_node(cls, flow):
          
          new = super().from_node(flow)
  
          # Will put all files found in outdir in GridFs
          d = {os.path.basename(f): f for f in flow.outdir.list_filepaths()}
  
          # Add the pickle file.
          d["pickle"] = flow.pickle_file if flow.pickle_protocol != 0 else (flow.pickle_file, "t")
          new.add_gridfs_files(**d)
  
          return new
docs: Initialize an instance from a Work instance.