def gotcha(x=''):
  print('''
                   ____       _       _             _   _   _ 
                  / ___| ___ | |_ ___| |__   __ _  | | | | | |
                 | |  _ / _ \| __/ __| '_ \ / _` | | | | | | |
                 | |_| | (_) | || (__| | | | (_| | |_| |_| |_|
                  \____|\___/ \__\___|_| |_|\__,_| (_) (_) (_)
  ''')
  if x:
    if type(x) == list or type(x) == dict or type(x) == tuple:
      import pprint
      print("\n")
      pprint.pprint(x)
      print("\n")
    else:
      out("Gotcha !!! %s !!! </%s>" % (x, globs.nest[-1:]))
  else:
    out("Gotcha (No value found). </%s>" % globs.nest[-1:])
  globs.nest = globs.nest[:-2]
  if x:
    raise RuntimeError('Forcing STOP with Gotcha: %s' % x)
  else:
    raise RuntimeError('Forcing STOP with Gotcha (no value found)')
Use to progressively zero in on return value issues.
dataset/ETHPy150Open miklevin/pipulate/common.py/gotcha