class_docstr: Listener for FunctionGraph events which makes sure that no
  operation overwrites the contents of protected Variables. The
  outputs of the FunctionGraph are protected by default.
code: def on_attach(self, fgraph):
      if hasattr(fgraph, "_supervisor"):
          raise AlreadyThere(
              f"A Supervisor is already attached to {fgraph}."
          )
  
      if self.fgraph is not None and self.fgraph != fgraph:
          raise Exception(
              "This Feature is already associated with a FunctionGraph"
          )
  
      fgraph._supervisor = self
      self.fgraph = fgraph
  
imports: import copy
  import copyreg
  import logging
  import time
  import warnings
  from itertools import chain
  from typing import TYPE_CHECKING, Optional
  import numpy
  import pytensor
  import pytensor.compile.profiling
  from pytensor.compile.io import In, SymbolicInput, SymbolicOutput
  from pytensor.compile.ops import deep_copy_op, view_op
  from pytensor.configdefaults import config
  from pytensor.graph.basic import Constant, Variable, ancestors, clone_get_equiv, graph_inputs
  from pytensor.graph.destroyhandler import DestroyHandler
  from pytensor.graph.features import AlreadyThere, Feature, PreserveVariableAttributes
  from pytensor.graph.fg import FunctionGraph
  from pytensor.graph.op import HasInnerGraph
  from pytensor.graph.utils import InconsistencyError, get_variable_trace_string
  from pytensor.link.basic import Container
  from pytensor.link.utils import raise_with_op
label_desc: Use image node_id 3 for calling the Supervisor obj's underlying member method code with example usage: obj.on_attach(fgraph) without return types