class_docstr: Represents a value to be computed by dask.
  
  Equivalent to the output from a single key in a dask graph.
class_docstr_tok: ["Represents","a","value","to","be","computed","by","dask",".","Equivalent","to","the","output","from","a","single","key","in","a","dask","graph","."]
code: def _rebuild(self, dsk, *, rename=None):
      key = (
          replace_name_in_key(self.key, rename) if rename else self.key
      )
      if isinstance(dsk, HighLevelGraph) and len(dsk.layers) == 1:
          # FIXME Delayed is currently the only collection type that supports both high- and low-level graphs.
          # The HLG output of `optimize` will have a layer name that doesn't match `key`.
          # Remove this when Delayed is HLG-only (because `optimize` will only be passed HLGs, so it won't have
          # to generate random layer names).
          layer = next(iter(dsk.layers))
      else:
          layer = None
      return Delayed(key, dsk, self._length, layer=layer)
  
imports: from __future__ import annotations
  import operator
  import types
  import uuid
  import warnings
  from collections.abc import Sequence
  from dataclasses import fields, is_dataclass, replace
  from functools import partial
  from tlz import concat, curry, merge, unique
  from dask import config
  from dask.base import DaskMethodsMixin, dont_optimize, is_dask_collection, named_schedulers, replace_name_in_key
  from dask.base import tokenize
  from dask.context import globalmethod
  from dask.core import flatten, quote
  from dask.highlevelgraph import HighLevelGraph
  from dask.typing import Graph, NestedKeys
  from dask.utils import OperatorMethodMixin, apply, funcname, is_namedtuple_instance, methodcaller
label_desc: Use image node_id 10 for calling the Delayed obj's underlying member method code with example usage: obj._rebuild(dsk) and returns: Delayed