code: def extract_pred_from_old_assum(all_exprs):
      """
      Returns a list of relevant new assumption predicate
      based on any old assumptions.
  
      Raises an UnhandledInput exception if any of the assumptions are
      unhandled.
  
      Ignored predicate:
      - commutative
      - complex
      - algebraic
      - transcendental
      - extended_real
      - real
      - all matrix predicate
      - rational
      - irrational
  
      Example
      =======
      >>> from sympy.assumptions.lra_satask import extract_pred_from_old_assum
      >>> from sympy import symbols
      >>> x, y = symbols("x y", positive=True)
      >>> extract_pred_from_old_assum([x, y, 2])
      [Q.positive(x), Q.positive(y)]
      """
      ret = []
      for expr in all_exprs:
          if not hasattr(expr, "free_symbols"):
              continue
          if len(expr.free_symbols) == 0:
              continue
  
          if expr.is_real is not True:
              raise UnhandledInput(f"LRASolver: {expr} must be real")
          # test for I times imaginary variable; such expressions are considered real
          if isinstance(expr, Mul) and any(
              arg.is_real is not True for arg in expr.args
          ):
              raise UnhandledInput(f"LRASolver: {expr} must be real")
  
          if expr.is_integer == True and expr.is_zero != True:
              raise UnhandledInput(f"LRASolver: {expr} is an integer")
          if expr.is_integer == False:
              raise UnhandledInput(
                  f"LRASolver: {expr} can't be an integer"
              )
          if expr.is_rational == False:
              raise UnhandledInput(f"LRASolver: {expr} is irational")
  
          if expr.is_zero:
              ret.append(Q.zero(expr))
          elif expr.is_positive:
              ret.append(Q.positive(expr))
          elif expr.is_negative:
              ret.append(Q.negative(expr))
          elif expr.is_nonzero:
              ret.append(Q.nonzero(expr))
          elif expr.is_nonpositive:
              ret.append(Q.nonpositive(expr))
          elif expr.is_nonnegative:
              ret.append(Q.nonnegative(expr))
  
      return ret
  
file_path: sympy/sympy/assumptions/lra_satask.py
imports: from sympy.assumptions.assume import global_assumptions
  from sympy.assumptions.cnf import CNF, EncodedCNF
  from sympy.assumptions.ask import Q
  from sympy.logic.inference import satisfiable
  from sympy.logic.algorithms.lra_theory import UnhandledInput, ALLOWED_PRED
  from sympy.matrices.kind import MatrixKind
  from sympy.core.kind import NumberKind
  from sympy.assumptions.assume import AppliedPredicate
  from sympy.core.mul import Mul
  from sympy.core.singleton import S
label_desc: Use image node_id 6 for calling a global function with example usage: extract_pred_from_old_assum(all_exprs) and returns: ret