class_docstr: A class that represents a collection/database of rewrites.
  
  These databases are used to logically organize collections of rewrites
  (i.e. `GraphRewriter`\s and `NodeRewriter`).
class_docstr_tok: ["A","class","that","represents","a","collection\/database","of","rewrites",".","These","databases","are","used","to","logically","organize","collections","of","rewrites","(","i.e",".","`","GraphRewriter","`","\\s","and","`","NodeRewriter","`",")","."]
code: def __init__(self):
      self.__db__ = DefaultOrderedDict(OrderedSet)
      self._names = set()
      # This will be reset by `self.register` (via `obj.name` by the thing
      # doing the registering)
      self.name = None
  
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 1 to create a new RewriteDatabase object  with example: obj = RewriteDatabase()