code: def test_sanity(self):
      x = as_symbol("x")
      y = as_symbol("y")
      z = as_symbol("z")
  
      assert x.op == Op.SYMBOL
      assert repr(x) == "Expr(Op.SYMBOL, 'x')"
      assert x == x
      assert x != y
      assert hash(x) is not None
  
      n = as_number(123)
      m = as_number(456)
      assert n.op == Op.INTEGER
      assert repr(n) == "Expr(Op.INTEGER, (123, 4))"
      assert n == n
      assert n != m
      assert hash(n) is not None
  
      fn = as_number(12.3)
      fm = as_number(45.6)
      assert fn.op == Op.REAL
      assert repr(fn) == "Expr(Op.REAL, (12.3, 4))"
      assert fn == fn
      assert fn != fm
      assert hash(fn) is not None
  
      c = as_complex(1, 2)
      c2 = as_complex(3, 4)
      assert c.op == Op.COMPLEX
      assert repr(c) == (
          "Expr(Op.COMPLEX, (Expr(Op.INTEGER, (1, 4)),"
          " Expr(Op.INTEGER, (2, 4))))"
      )
      assert c == c
      assert c != c2
      assert hash(c) is not None
  
      s = as_string("'123'")
      s2 = as_string('"ABC"')
      assert s.op == Op.STRING
      assert repr(s) == "Expr(Op.STRING, (\"'123'\", 1))", repr(s)
      assert s == s
      assert s != s2
  
      a = as_array((n, m))
      b = as_array((n,))
      assert a.op == Op.ARRAY
      assert repr(a) == (
          "Expr(Op.ARRAY, (Expr(Op.INTEGER, (123, 4)),"
          " Expr(Op.INTEGER, (456, 4))))"
      )
      assert a == a
      assert a != b
  
      t = as_terms(x)
      u = as_terms(y)
      assert t.op == Op.TERMS
      assert repr(t) == "Expr(Op.TERMS, {Expr(Op.SYMBOL, 'x'): 1})"
      assert t == t
      assert t != u
      assert hash(t) is not None
  
      v = as_factors(x)
      w = as_factors(y)
      assert v.op == Op.FACTORS
      assert repr(v) == "Expr(Op.FACTORS, {Expr(Op.SYMBOL, 'x'): 1})"
      assert v == v
      assert w != v
      assert hash(v) is not None
  
      t = as_ternary(x, y, z)
      u = as_ternary(x, z, y)
      assert t.op == Op.TERNARY
      assert t == t
      assert t != u
      assert hash(t) is not None
  
      e = as_eq(x, y)
      f = as_lt(x, y)
      assert e.op == Op.RELATIONAL
      assert e == e
      assert e != f
      assert hash(e) is not None
  
file_path: numpy/numpy/f2py/tests/test_symbolic.py
imports: import pytest
  from numpy.f2py.symbolic import Expr, Op, ArithOp, Language, as_symbol, as_number, as_string, as_array, as_complex, as_terms, as_factors, eliminate_quotes, insert_quotes, fromstring, as_expr, as_apply, as_numer_denom, as_ternary, as_ref, as_deref, normalize, as_eq, as_ne, as_lt, as_gt, as_le, as_ge
  from .None import util
label_desc: Use image node_id 2 for calling the TestSymbolic obj's underlying member method code with example usage: obj.test_sanity() without return types