class_docstr: A sequence of potential rewrites.
  
  Retrieve a sequence of rewrites as a `SequentialGraphRewriter` by calling
  `SequenceDB.query`.
  
  Each potential rewrite is registered with a floating-point position.
  No matter which rewrites are selected by a query, they are carried
  out in order of increasing position.
class_docstr_tok: ["A","sequence","of","potential","rewrites",".","Retrieve","a","sequence","of","rewrites","as","a","`","SequentialGraphRewriter","`","by","calling","`","SequenceDB.query","`",".","Each","potential","rewrite","is","registered","with","a","floating-point","position",".","No","matter","which","rewrites","are","selected","by","a","query",",","they","are","carried","out","in","order","of","increasing","position","."]
code: def register(self, name, obj, *tags, **kwargs):
      position = kwargs.pop("position", "last")
  
      super().register(name, obj, *tags, **kwargs)
  
      if position == "last":
          if len(self.__position__) == 0:
              self.__position__[name] = 0
          else:
              self.__position__[name] = (
                  max(self.__position__.values()) + 1
              )
      elif isinstance(position, (int, float)):
          self.__position__[name] = position
      else:
          raise TypeError(f"`position` must be numeric; got {position}")
  
imports: import copy
  import math
  import sys
  from collections.abc import Iterable, Sequence
  from functools import cmp_to_key
  from io import StringIO
  from typing import Optional, Union
  from pytensor.configdefaults import config
  from pytensor.graph.rewriting import basic
  from pytensor.misc.ordered_set import OrderedSet
  from pytensor.utils import DefaultOrderedDict
label_desc: Use image node_id 2 for calling the SequenceDB obj's underlying member method code with example usage: obj.register(name, obj) without return types