code: def test_doc(self):
      # Ensure the code given in pfunc.txt works as expected
  
      # Example #1.
      a = lscalar()
      b = shared(1)
      f1 = pfunc([a], (a + b))
      f2 = pfunc([In(a, value=44)], a + b, updates={b: b + 1})
      assert b.get_value() == 1
      assert f1(3) == 4
      assert f2(3) == 4
      assert b.get_value() == 2
      assert f1(3) == 5
      b.set_value(0)
      assert f1(3) == 3
  
      # Example #2.
      a = lscalar()
      b = shared(7)
      f1 = pfunc([a], a + b)
      f2 = pfunc([a], a * b)
      assert f1(5) == 12
      b.set_value(8)
      assert f1(5) == 13
      assert f2(4) == 32
  
imports: import numpy
  import pytest
  import pytensor.tensor
  from pytensor.compile import UnusedInputError, get_mode
  from pytensor.compile.function import function, pfunc
  from pytensor.compile.function.pfunc import rebuild_collect_shared
  from pytensor.compile.io import In
  from pytensor.compile.sharedvalue import shared
  from pytensor.configdefaults import config
  from pytensor.graph.utils import MissingInputError
  from pytensor.misc.safe_asarray import _asarray
  from pytensor.tensor.math import sum
  from pytensor.tensor.type import bscalar, bvector, dmatrices, dmatrix, dscalar, dvector, fscalar, fvector, imatrix, iscalar, ivector, ivectors, lscalar, wvector
  from pytensor.utils import PYTHON_INT_BITWIDTH
label_desc: Use image node_id 2 for calling the TestPfunc obj's underlying member method code with example usage: obj.test_doc() without return types