code: def test_subs():
      t1 = F.Term("x")
      t2 = F.Term("y")
      z = F.Term("z")
      f = F.Formula([t1, t2])
      g = f.subs(t1, z)
      assert list(g.terms) == [z, t2]
  
imports: from warnings import catch_warnings, simplefilter
  import numpy
  import pytest
  import sympy
  from numpy.core.records import fromrecords
  from numpy.testing import assert_almost_equal, assert_array_equal
  from sympy.utilities.lambdify import implemented_function
  from nipy.utils import VisibleDeprecationWarning
  from ..None import formulae
  from ..formulae import Term, terms
label_desc: Use image node_id 28 for calling a global function with example usage: test_subs() without return types