def is_xml(obj):
 global types
 try:
  _bootstrap()
 except ImportError:
  return False
 return isinstance(obj, types)

def is_xml ( obj ) : global types try : _bootstrap ( ) except ImportError : return False return isinstance ( obj , types )
determines c{obj} is a valid xml type .