def check_object(obj):
    if type(obj) in (str, unicode):
        return POM.Text(obj)
    if isinstance(obj, POM.ElementNode):
        return obj
    raise POM.ValidationError, "bad initializer object"
dataset/ETHPy150Open kdart/pycopia/XML/pycopia/XML/Plaintext.py/check_object/original