code: def check_assumptions(expr, against=None, **assume):
      """
      Checks whether assumptions of ``expr`` match the T/F assumptions
      given (or possessed by ``against``). True is returned if all
      assumptions match; False is returned if there is a mismatch and
      the assumption in ``expr`` is not None; else None is returned.
  
      Explanation
      ===========
  
      *assume* is a dict of assumptions with True or False values
  
      Examples
      ========
  
      >>> from sympy import Symbol, pi, I, exp, check_assumptions
      >>> check_assumptions(-5, integer=True)
      True
      >>> check_assumptions(pi, real=True, integer=False)
      True
      >>> check_assumptions(pi, negative=True)
      False
      >>> check_assumptions(exp(I*pi/7), real=False)
      True
      >>> x = Symbol('x', positive=True)
      >>> check_assumptions(2*x + 1, positive=True)
      True
      >>> check_assumptions(-2*x - 5, positive=True)
      False
  
      To check assumptions of *expr* against another variable or expression,
      pass the expression or variable as ``against``.
  
      >>> check_assumptions(2*x + 1, x)
      True
  
      To see if a number matches the assumptions of an expression, pass
      the number as the first argument, else its specific assumptions
      may not have a non-None value in the expression:
  
      >>> check_assumptions(x, 3)
      >>> check_assumptions(3, x)
      True
  
      ``None`` is returned if ``check_assumptions()`` could not conclude.
  
      >>> check_assumptions(2*x - 1, x)
  
      >>> z = Symbol('z')
      >>> check_assumptions(z, real=True)
  
      See Also
      ========
  
      failing_assumptions
  
      """
      expr = sympify(expr)
      if against is not None:
          if assume:
              raise ValueError(
                  "Expecting `against` or `assume`, not both."
              )
          assume = assumptions(against)
      known = True
      for k, v in assume.items():
          if v is None:
              continue
          e = getattr(expr, "is_" + k, None)
          if e is None:
              known = None
          elif v != e:
              return False
      return known
  
imports: from sympy.utilities.exceptions import sympy_deprecation_warning
  from .facts import FactRules, FactKB
  from .sympify import sympify
  from sympy.core.random import _assumptions_shuffle
  from sympy.core.assumptions_generated import generated_assumptions
label_desc: Use image node_id 6 for calling a global function with example usage: check_assumptions(expr, against) and returns: known, False