code: def isexception(obj):
      """Given an object, return a boolean indicating whether it is an instance
      or subclass of :py:class:`Exception`.
      """
      if isinstance(obj, Exception):
          return True
      if isclass(obj) and issubclass(obj, Exception):
          return True
      return False
  
imports: import os
  from sys import stdout
  from collections import OrderedDict
  from contextlib import contextmanager
  from inspect import isclass
  import tablib
  from docopt import docopt
  from sqlalchemy import create_engine, exc, inspect, text
label_desc: Use image node_id 1 for calling a global function with example usage: isexception(obj) and returns: False, True, True