def _default_ns_prefix(nsmap):
if None in nsmap:<EOL><INDENT>default_url = nsmap[None]<EOL>prefix = None<EOL>for key, val in nsmap.iteritems():<EOL><INDENT>if val == default_url and key is not None:<EOL><INDENT>prefix = key<EOL>break<EOL><DEDENT><DEDENT>else:<EOL><INDENT>raise ValueError(<EOL>"<STR_LIT>".format(<EOL>url=default_url<EOL>)<EOL>)<EOL><DEDENT>return prefix<EOL><DEDENT>raise ValueError("<STR_LIT>")<EOL>
XML doc may have several prefix:namespace_url pairs, can also specify
a namespace_url as default, tags in that namespace don't need a prefix
NOTE:
we rely on default namespace also present in prefixed form, I'm not sure if
this is an XML certainty or a quirk of the eBay WSDLs

in our case the WSDL contains:
    <wsdl:documentation>
        <Version>1.0.0</Version>
    </wsdl:documentation>
...but our query needs to give a prefix to the path of `Version` so we need
to determine the default namespace of the doc, find the matching prefix and
return it