code: def refine_Determinant(expr, assumptions):
      """
      >>> from sympy import MatrixSymbol, Q, assuming, refine, det
      >>> X = MatrixSymbol('X', 2, 2)
      >>> det(X)
      Determinant(X)
      >>> with assuming(Q.orthogonal(X)):
      ...     print(refine(det(X)))
      1
      """
      if ask(Q.orthogonal(expr.arg), assumptions):
          return S.One
      elif ask(Q.singular(expr.arg), assumptions):
          return S.Zero
      elif ask(Q.unit_triangular(expr.arg), assumptions):
          return S.One
  
      return expr
  
imports: from sympy.core.basic import Basic
  from sympy.core.expr import Expr
  from sympy.core.singleton import S
  from sympy.core.sympify import sympify
  from sympy.matrices.exceptions import NonSquareMatrixError
  from sympy.matrices.matrixbase import MatrixBase
  from sympy.assumptions.ask import ask, Q
  from sympy.assumptions.refine import handlers_dict
label_desc: Use image node_id 3 for calling a global function with example usage: refine_Determinant(expr, assumptions) and returns: expr, S, S, S