code: def test_operations(self):
      x = as_symbol("x")
      y = as_symbol("y")
      z = as_symbol("z")
  
      assert x + x == Expr(Op.TERMS, {x: 2})
      assert x - x == Expr(Op.INTEGER, (0, 4))
      assert x + y == Expr(Op.TERMS, {x: 1, y: 1})
      assert x - y == Expr(Op.TERMS, {x: 1, y: -1})
      assert x * x == Expr(Op.FACTORS, {x: 2})
      assert x * y == Expr(Op.FACTORS, {x: 1, y: 1})
  
      assert +x == x
      assert -x == Expr(Op.TERMS, {x: -1}), repr(-x)
      assert 2 * x == Expr(Op.TERMS, {x: 2})
      assert 2 + x == Expr(Op.TERMS, {x: 1, as_number(1): 2})
      assert 2 * x + 3 * y == Expr(Op.TERMS, {x: 2, y: 3})
      assert (x + y) * 2 == Expr(Op.TERMS, {x: 2, y: 2})
  
      assert x**2 == Expr(Op.FACTORS, {x: 2})
      assert (x + y) ** 2 == Expr(
          Op.TERMS,
          {
              Expr(Op.FACTORS, {x: 2}): 1,
              Expr(Op.FACTORS, {y: 2}): 1,
              Expr(Op.FACTORS, {x: 1, y: 1}): 2,
          },
      )
      assert (x + y) * x == x**2 + x * y
      assert (x + y) ** 2 == x**2 + 2 * x * y + y**2
      assert (x + y) ** 2 + (x - y) ** 2 == 2 * x**2 + 2 * y**2
      assert (x + y) * z == x * z + y * z
      assert z * (x + y) == x * z + y * z
  
      assert (x / 2) == as_apply(ArithOp.DIV, x, as_number(2))
      assert (2 * x / 2) == x
      assert (3 * x / 2) == as_apply(ArithOp.DIV, 3 * x, as_number(2))
      assert (4 * x / 2) == 2 * x
      assert (5 * x / 2) == as_apply(ArithOp.DIV, 5 * x, as_number(2))
      assert (6 * x / 2) == 3 * x
      assert ((3 * 5) * x / 6) == as_apply(
          ArithOp.DIV, 5 * x, as_number(2)
      )
      assert (
          30 * x**2 * y**4 / (24 * x**3 * y**3)
      ) == as_apply(ArithOp.DIV, 5 * y, 4 * x)
      assert ((15 * x / 6) / 5) == as_apply(
          ArithOp.DIV, x, as_number(2)
      ), (15 * x / 6) / 5
      assert (x / (5 / x)) == as_apply(
          ArithOp.DIV, x**2, as_number(5)
      )
  
      assert (x / 2.0) == Expr(Op.TERMS, {x: 0.5})
  
      s = as_string('"ABC"')
      t = as_string('"123"')
  
      assert s // t == Expr(Op.STRING, ('"ABC123"', 1))
      assert s // x == Expr(Op.CONCAT, (s, x))
      assert x // s == Expr(Op.CONCAT, (x, s))
  
      c = as_complex(1.0, 2.0)
      assert -c == as_complex(-1.0, -2.0)
      assert c + c == as_expr((1 + 2j) * 2)
      assert c * c == as_expr((1 + 2j) ** 2)
  
file_path: catboost/contrib/python/numpy/py3/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 5 for calling the TestSymbolic obj's underlying member method code with example usage: obj.test_operations() without return types