code: def checkattr(metacls, attr, value):
          
          if not isinstance(value, (
                  types.MethodType,
                  types.FunctionType,
                  classmethod,
                  staticmethod,
                  property)):
              if attr in dir(type('dummy', (object,), {})) + \
                      ['__metaclass__', '__qualname__']:
                  return
              if attr.startswith('_'):
                  raise SyntaxError(
                      "TreeModel attribute `{0}` "
                      "must not start with `_`".format(attr))
              if not inspect.isclass(value):
                  if not isinstance(value, Column):
                      raise TypeError(
                          "TreeModel attribute `{0}` "
                          "must be an instance of "
                          "`rootpy.tree.treetypes.Column`".format(attr))
                  return
              if not issubclass(value, (ROOT.TObject, ROOT.ObjectProxy)):
                  raise TypeError(
                      "TreeModel attribute `{0}` must inherit "
                      "from `ROOT.TObject` or `ROOT.ObjectProxy`".format(
                          attr))
docs: Only allow class attributes that are instances of
          rootpy.types.Column, ROOT.TObject, or ROOT.ObjectProxy