class_docstr: Subclass of `Pickler` that strips unnecessary attributes from PyTensor objects.
  
  Example
  -------
  
  ..code-block:: python
  
      fn_args = dict(inputs=inputs,
                     outputs=outputs,
                     updates=updates)
      dest_pkl = 'my_test.pkl'
      with open(dest_pkl, 'wb') as f:
          strip_pickler = StripPickler(f, protocol=-1)
          strip_pickler.dump(fn_args)
class_docstr_tok: ["Subclass","of","`","Pickler","`","that","strips","unnecessary","attributes","from","PyTensor","objects",".","Example","--","--","--","-","..","code-block",":",":","python","fn_args","=","dict","(","inputs=inputs",",","outputs=outputs",",","updates=updates",")","dest_pkl","=","'my_test.pkl'","with","open","(","dest_pkl",",","'wb","'",")","as","f",":","strip_pickler","=","StripPickler","(","f",",","protocol=-1",")","strip_pickler.dump","(","fn_args",")"]
code: def save(self, obj):
      # Remove the tag.trace attribute from Variable and Apply nodes
      if isinstance(obj, pytensor.graph.utils.Scratchpad):
          for tag in self.tag_to_remove:
              if hasattr(obj, tag):
                  del obj.__dict__[tag]
      # Remove manually-added docstring of Elemwise ops
      elif isinstance(obj, pytensor.tensor.elemwise.Elemwise):
          if "__doc__" in obj.__dict__:
              del obj.__dict__["__doc__"]
  
      return Pickler.save(self, obj)
  
imports: import os
  import pickle
  import sys
  import tempfile
  import zipfile
  from collections import defaultdict
  from contextlib import closing
  from io import BytesIO
  from pickle import HIGHEST_PROTOCOL
  import numpy
  import pytensor
  from pytensor.compile.sharedvalue import SharedVariable
label_desc: Use image node_id 2 for calling the StripPickler obj's underlying member method code with example usage: obj.save(obj) and returns: Pickler