docstr: Code snippets, sent by the client on compute(), persist(), and submit().
  
  Only populated if ``distributed.diagnostics.computations.nframes`` is non-zero.
docstr_tok: ["Code","snippets",",","sent","by","the","client","on","compute","(",")",",","persist","(",")",",","and","submit","(",")",".","Only","populated","if","``","distributed.diagnostics.computations.nframes","``","is","non-zero","."]
code: def code(self) -> list[tuple[SourceCode, ...]]:
      """Code snippets, sent by the client on compute(), persist(), and submit().
  
      Only populated if ``distributed.diagnostics.computations.nframes`` is non-zero.
      """
      # Deduplicate, but preserve order
      return list(
          dict.fromkeys(
              sc
              for child in self.traverse_spans()
              for sc in child._code
          )
      )
  
imports: from __future__ import annotations
  import uuid
  import weakref
  from collections import defaultdict
  from collections.abc import Hashable, Iterable, Iterator
  from contextlib import contextmanager
  from itertools import islice
  from typing import TYPE_CHECKING, Any
  import dask.config
  from dask.typing import Key
  from distributed.collections import sum_mappings
  from distributed.itertools import ffill
  from distributed.metrics import time
label_desc: Use image node_id 14 for calling the Span obj's underlying member method code with example usage: obj.code() and returns: list