code: def test_namespace_prefix(parser, geom_df):
      expected = """\
  <?xml version='1.0' encoding='utf-8'?>
  <doc:data xmlns:doc="http://example.com">
    <doc:row>
      <doc:index>0</doc:index>
      <doc:shape>square</doc:shape>
      <doc:degrees>360</doc:degrees>
      <doc:sides>4.0</doc:sides>
    </doc:row>
    <doc:row>
      <doc:index>1</doc:index>
      <doc:shape>circle</doc:shape>
      <doc:degrees>360</doc:degrees>
      <doc:sides/>
    </doc:row>
    <doc:row>
      <doc:index>2</doc:index>
      <doc:shape>triangle</doc:shape>
      <doc:degrees>180</doc:degrees>
      <doc:sides>3.0</doc:sides>
    </doc:row>
  </doc:data>"""
  
      output = geom_df.to_xml(
          namespaces={"doc": "http://example.com"},
          prefix="doc",
          parser=parser,
      )
      output = equalize_decl(output)
  
      assert output == expected
  
imports: from __future__ import annotations
  from io import BytesIO, StringIO
  import os
  import numpy
  import pytest
  import pandas.util._test_decorators
  from pandas import NA, DataFrame, Index
  import pandas._testing
  from pandas.io.common import get_handle
  from pandas.io.xml import read_xml
label_desc: Use image node_id 31 for calling a global function with example usage: test_namespace_prefix(parser, geom_df) without return types