code: def test_tensor_shared_zero():
      shared_val = np.array([1.0, 3.0], dtype=np.float32)
      res = pytensor.shared(value=shared_val, borrow=True)
      assert isinstance(res, TensorSharedVariable)
      assert res.get_value(borrow=True) is shared_val
  
      res.zero(borrow=True)
      new_shared_val = res.get_value(borrow=True)
      assert new_shared_val is shared_val
      assert np.array_equal(
          new_shared_val, np.zeros((2,), dtype=np.float32)
      )
  
      res.set_value(shared_val, borrow=True)
  
      res.zero(borrow=False)
      new_shared_val = res.get_value(borrow=True)
      assert new_shared_val is not shared_val
      assert np.array_equal(
          new_shared_val, np.zeros((2,), dtype=np.float32)
      )
  
file_path: pytensor/tests/tensor/test_sharedvar.py
imports: from functools import update_wrapper
  import numpy
  import pytest
  import pytensor
  import pytensor.sparse
  import pytensor.tensor
  from pytensor.misc.may_share_memory import may_share_memory
  from pytensor.tensor import get_vector_length
  from pytensor.tensor.basic import MakeVector
  from pytensor.tensor.shape import Shape_i, specify_shape
  from pytensor.tensor.sharedvar import ScalarSharedVariable, TensorSharedVariable
  from tests import unittest_tools
label_desc: Use image node_id 2 for calling a global function with example usage: test_tensor_shared_zero() without return types