code: def match(match_expr, exc_type, exc_value, exc_traceback):
      
      # Emulate standard behavior when match_expr is an exception subclass.
      if isinstance(match_expr, type) and issubclass(match_expr, BaseException):
          return issubclass(exc_type, match_expr)
  
      # Match on type and args when match_expr is an exception instance.
      return (
          issubclass(exc_type, type(match_expr))
          and
          match_expr.args == exc_value.args
      )
docs: Called to determine whether or not an except block should be matched.
  
      True -> enter except block
      False -> don't enter except block