class_docstr: Base type for all linkers.
  
  A linker takes a FunctionGraph and turns it into a callable.
  
  Parameters
  ----------
  allow_gc : optional, bool
      Configures if garbage collection is enabled.
  scheduler : callable
      A scheduling function that takes a FunctionGraph and returns
      a list of Apply nodes. Defaults to the .toposort() method of
      the FunctionGraph.
class_docstr_tok: ["Base","type","for","all","linkers",".","A","linker","takes","a","FunctionGraph","and","turns","it","into","a","callable",".","Parameters","--","--","--","--","--","allow_gc",":","optional",",","bool","Configures","if","garbage","collection","is","enabled",".","scheduler",":","callable","A","scheduling","function","that","takes","a","FunctionGraph","and","returns","a","list","of","Apply","nodes",".","Defaults","to","the",".toposort","(",")","method","of","the","FunctionGraph","."]
code: def __init__(
      self,
      *,
      allow_gc: Optional[bool] = None,
      scheduler: Optional[
          Callable[[FunctionGraph], list[Apply]]
      ] = None,
  ) -> None:
      self._allow_gc = allow_gc
      self._scheduler = scheduler
      super().__init__()
  
imports: from abc import ABC, abstractmethod
  from collections.abc import Sequence
  from copy import copy, deepcopy
  from typing import TYPE_CHECKING, Any, Callable, Optional, Union
  from pytensor.configdefaults import config
  from pytensor.graph.basic import Apply, Variable
  from pytensor.graph.fg import FunctionGraph
  from pytensor.graph.type import Type
  from pytensor.link.utils import gc_helper, map_storage, raise_with_op, streamline
  from pytensor.utils import difference
label_desc: Use image node_id 1 to create a new Linker object from inherited base classes: ABC with example: obj = Linker()