code: def test_lpmin_lpmax():
      v = x1, x2, y1, y2 = symbols("x1 x2 y1 y2")
      L = [[1, -1]], [1], [[1, 1]], [2]
      a, b, c, d = [Matrix(i) for i in L]
      m = Matrix([[a, b], [c, d]])
      f, constr = _primal_dual(m)[0]
      ans = lpmin(f, constr + [i >= 0 for i in v[:2]])
      assert ans == (-1, {x1: 1, x2: 0}), ans
  
      L = [[1, -1], [1, 1]], [1, 1], [[1, 1]], [2]
      a, b, c, d = [Matrix(i) for i in L]
      m = Matrix([[a, b], [c, d]])
      f, constr = _primal_dual(m)[1]
      ans = lpmax(f, constr + [i >= 0 for i in v[-2:]])
      assert ans == (-1, {y1: 1, y2: 0})
  
file_path: sympy/sympy/solvers/tests/test_simplex.py
imports: from sympy.core.numbers import Rational
  from sympy.core.relational import Relational, Eq, Ne
  from sympy.core.symbol import symbols
  from sympy.core.sympify import sympify
  from sympy.core.singleton import S
  from sympy.core.random import random, choice
  from sympy.functions.elementary.miscellaneous import sqrt
  from sympy.ntheory.generate import randprime
  from sympy.matrices.dense import Matrix, eye
  from sympy.solvers.solveset import linear_eq_to_matrix
  from sympy.solvers.simplex import _lp, _primal_dual, UnboundedLPError, InfeasibleLPError, lpmin, lpmax, _m, _abcd, _simplex, linprog
  from sympy.external.importtools import import_module
  from sympy.testing.pytest import raises
  from sympy.abc import x, y, z
label_desc: Use image node_id 4 for calling a global function with example usage: test_lpmin_lpmax() without return types