def get_input_source(content):
 if (not isinstance(content, InputSource)):
  content = XmlInputSource(content)
 return content

def get_input_source ( content ) : if ( not isinstance ( content , InputSource ) ) : content = XmlInputSource ( content ) return content
wrap an xml element in a xmlinputsource if needed .