code: def strides_for_shape(shape: Tuple[int, ...]) -> Tuple[int, ...]:
      if not shape:
          return ()
      strides = tuple(
          itertools.accumulate(
              reversed(shape[1:]), operator.mul, initial=1
          )
      )
      return canonicalize_strides(shape, strides[::-1])
  
imports: from __future__ import annotations
  import functools, operator, itertools
  from dataclasses import dataclass
  from typing import Tuple, List, Optional, Dict, cast
  from tinygrad.helpers import prod, all_int, argsort
  from tinygrad.shape.symbolic import Node, NumNode, Variable, Set, sint
label_desc: Use image node_id 2 for calling a global function with example usage: strides_for_shape(shape) and returns: canonicalize_strides, 