docstr: Return the order of a sequence as a permutation of range(len(seq)) and guard on that order not changing.
  Used for generating block_ptrs.
code: def guarded_order(self, seq):
      """
      Return the order of a sequence as a permutation of range(len(seq)) and guard on that order not changing.
      Used for generating block_ptrs.
      """
      seq = [*map(self.remove_precomputed_replacements, seq)]
      seq = [
          (self.size_hint(var), orig_idx, var)
          for orig_idx, var in enumerate(seq)
      ]
      seq.sort()
      order = [-1] * len(seq)
      last_var = None
      for new_index, (_, orig_index, var) in enumerate(seq):
          order[orig_index] = new_index
          if last_var is not None:
              self.guard_leq(last_var, var)
          last_var = var
      return order
  
imports: import functools
  import itertools
  import logging
  from typing import Any, Callable, Dict, Iterable, List, Optional, Set, Tuple, Union
  import sympy
  from sympy import Expr
  from torch.fx.experimental.symbolic_shapes import ShapeEnv
  from torch.utils._sympy.functions import FloorDiv, ModularIndexing
  from torch.utils._sympy.value_ranges import bound_sympy
  from .utils import sympy_subs, sympy_symbol, VarRanges
  from .virtualized import V
label_desc: Use image node_id 18 for calling the SizeVarAllocator obj's underlying member method code with example usage: obj.guarded_order(seq) and returns: order