class_docstr: Variable that is shared between compiled functions.
class_docstr_tok: ["Variable","that","is","shared","between","compiled","functions","."]
docstr: Set the non-symbolic value associated with this SharedVariable.
  
  Parameters
  ----------
  borrow : bool
      True to use the new_value directly, potentially creating problems
      related to aliased memory.
  
  Changes to this value will be visible to all functions using
  this SharedVariable.
docstr_tok: ["Set","the","non-symbolic","value","associated","with","this","SharedVariable",".","Parameters","--","--","--","--","--","borrow",":","bool","True","to","use","the","new_value","directly",",","potentially","creating","problems","related","to","aliased","memory",".","Changes","to","this","value","will","be","visible","to","all","functions","using","this","SharedVariable","."]
code: def set_value(self, new_value, borrow=False):
      """
      Set the non-symbolic value associated with this SharedVariable.
  
      Parameters
      ----------
      borrow : bool
          True to use the new_value directly, potentially creating problems
          related to aliased memory.
  
      Changes to this value will be visible to all functions using
      this SharedVariable.
      """
      if borrow:
          self.container.value = new_value
      else:
          self.container.value = copy.deepcopy(new_value)
  
file_path: pytensor/pytensor/compile/sharedvalue.py
imports: import copy
  from contextlib import contextmanager
  from functools import singledispatch
  from typing import TYPE_CHECKING, Optional
  from pytensor.graph.basic import Variable
  from pytensor.graph.utils import add_tag_trace
  from pytensor.link.basic import Container
  from pytensor.link.c.type import generic
label_desc: Use image node_id 3 for calling the SharedVariable obj's underlying member method code with example usage: obj.set_value(new_value, borrow) without return types