code: def make_random_problem(
      num_variables=2,
      num_constraints=2,
      sparsity=0.1,
      rational=True,
      disable_strict=False,
      disable_nonstrict=False,
      disable_equality=False,
  ):
      def rand(sparsity=sparsity):
          if random() < sparsity:
              return sympify(0)
          if rational:
              int1, int2 = [randprime(0, 50) for _ in range(2)]
              return Rational(int1, int2) * choice([-1, 1])
          else:
              return randint(1, 10) * choice([-1, 1])
  
      variables = symbols("x1:%s" % (num_variables + 1))
      constraints = []
      for _ in range(num_constraints):
          lhs, rhs = sum(rand() * x for x in variables), rand(
              sparsity=0
          )  # sparsity=0  bc of bug with smtlib_code
          options = []
          if not disable_equality:
              options += [Eq(lhs, rhs)]
          if not disable_nonstrict:
              options += [lhs <= rhs, lhs >= rhs]
          if not disable_strict:
              options += [lhs < rhs, lhs > rhs]
  
          constraints.append(choice(options))
  
      return constraints
  
imports: from sympy.core.numbers import Rational, I, oo
  from sympy.core.relational import Eq
  from sympy.core.symbol import symbols
  from sympy.core.singleton import S
  from sympy.matrices.dense import Matrix
  from sympy.matrices.dense import randMatrix
  from sympy.assumptions.ask import Q
  from sympy.logic.boolalg import And
  from sympy.abc import x, y, z
  from sympy.assumptions.cnf import CNF, EncodedCNF
  from sympy.functions.elementary.trigonometric import cos
  from sympy.external import import_module
  from sympy.logic.algorithms.lra_theory import LRASolver, UnhandledInput, LRARational, HANDLE_NEGATION
  from sympy.core.random import random, choice, randint
  from sympy.core.sympify import sympify
  from sympy.ntheory.generate import randprime
  from sympy.core.relational import StrictLessThan, StrictGreaterThan
  import itertools
  from sympy.testing.pytest import raises, XFAIL, skip
label_desc: Use image node_id 1 for calling a global function with example usage: make_random_problem(num_variables, num_constraints, sparsity, rational, disable_strict, disable_nonstrict, disable_equality) and returns: constraints, sympify, unknown, unknown