docs: def func_attr(f, attr):
      """
      Helper function to get the attribute of a function
      like, name, code, defaults across Python 2.x and 3.x
      """
      if hasattr(f, 'func_%s' % attr):
          return getattr(f, 'func_%s' % attr)
      elif hasattr(f, '__%s__' % attr):
          return getattr(f, '__%s__' % attr)
      else:
          raise ValueError('Object %s has no attr' % (str(f), attr))