code: def test_linear():
      assert diop_solve(x) == (0,)
      assert diop_solve(1 * x) == (0,)
      assert diop_solve(3 * x) == (0,)
      assert diop_solve(x + 1) == (-1,)
      assert diop_solve(2 * x + 1) == (None,)
      assert diop_solve(2 * x + 4) == (-2,)
      assert diop_solve(y + x) == (t_0, -t_0)
      assert diop_solve(y + x + 0) == (t_0, -t_0)
      assert diop_solve(y + x - 0) == (t_0, -t_0)
      assert diop_solve(0 * x - y - 5) == (-5,)
      assert diop_solve(3 * y + 2 * x - 5) == (
          3 * t_0 - 5,
          -2 * t_0 + 5,
      )
      assert diop_solve(2 * x - 3 * y - 5) == (3 * t_0 - 5, 2 * t_0 - 5)
      assert diop_solve(-2 * x - 3 * y - 5) == (
          3 * t_0 + 5,
          -2 * t_0 - 5,
      )
      assert diop_solve(7 * x + 5 * y) == (5 * t_0, -7 * t_0)
      assert diop_solve(2 * x + 4 * y) == (-2 * t_0, t_0)
      assert diop_solve(4 * x + 6 * y - 4) == (
          3 * t_0 - 2,
          -2 * t_0 + 2,
      )
      assert diop_solve(4 * x + 6 * y - 3) == (None, None)
      assert diop_solve(0 * x + 3 * y - 4 * z + 5) == (
          4 * t_0 + 5,
          3 * t_0 + 5,
      )
      assert diop_solve(4 * x + 3 * y - 4 * z + 5) == (
          t_0,
          8 * t_0 + 4 * t_1 + 5,
          7 * t_0 + 3 * t_1 + 5,
      )
      assert diop_solve(4 * x + 3 * y - 4 * z + 5, None) == (0, 5, 5)
      assert diop_solve(4 * x + 2 * y + 8 * z - 5) == (None, None, None)
      assert diop_solve(5 * x + 7 * y - 2 * z - 6) == (
          t_0,
          -3 * t_0 + 2 * t_1 + 6,
          -8 * t_0 + 7 * t_1 + 18,
      )
      assert diop_solve(3 * x - 6 * y + 12 * z - 9) == (
          2 * t_0 + 3,
          t_0 + 2 * t_1,
          t_1,
      )
      assert diop_solve(6 * w + 9 * x + 20 * y - z) == (
          t_0,
          t_1,
          t_1 + t_2,
          6 * t_0 + 29 * t_1 + 20 * t_2,
      )
  
      # to ignore constant factors, use diophantine
      raises(TypeError, lambda: diop_solve(x / 2))
  
imports: from sympy.core.add import Add
  from sympy.core.mul import Mul
  from sympy.core.numbers import Rational, oo, pi
  from sympy.core.relational import Eq
  from sympy.core.singleton import S
  from sympy.core.symbol import symbols
  from sympy.matrices.dense import Matrix
  from sympy.ntheory.factor_ import factorint
  from sympy.simplify.powsimp import powsimp
  from sympy.core.function import _mexpand
  from sympy.core.sorting import default_sort_key, ordered
  from sympy.functions.elementary.trigonometric import sin
  from sympy.solvers.diophantine import diophantine
  from sympy.solvers.diophantine.diophantine import diop_DN, diop_solve, diop_ternary_quadratic_normal, diop_general_pythagorean, diop_ternary_quadratic, diop_linear, diop_quadratic, diop_general_sum_of_squares, diop_general_sum_of_even_powers, descent, diop_bf_DN, divisible, equivalent, find_DN, ldescent, length, reconstruct, partition, power_representation, prime_as_sum_of_two_squares, square_factor, sum_of_four_squares, sum_of_three_squares, transformation_to_DN, transformation_to_normal, classify_diop, base_solution_linear, cornacchia, sqf_normal, gaussian_reduce, holzer, check_param, parametrize_ternary_quadratic, sum_of_powers, sum_of_squares, _diop_ternary_quadratic_normal, _nint_or_floor, _odd, _even, _remove_gcd, _can_do_sum_of_squares, DiophantineSolutionSet, GeneralPythagorean, BinaryQuadratic
  from sympy.testing.pytest import slow, raises, XFAIL
  from sympy.utilities.iterables import signed_permutations
label_desc: Use image node_id 6 for calling a global function with example usage: test_linear() without return types