code: def test_elems_cols_nan_output(parser, geom_df):
      elems_cols_expected = """\
  <?xml version='1.0' encoding='utf-8'?>
  <data>
    <row>
      <degrees>360</degrees>
      <sides>4.0</sides>
      <shape>square</shape>
    </row>
    <row>
      <degrees>360</degrees>
      <sides/>
      <shape>circle</shape>
    </row>
    <row>
      <degrees>180</degrees>
      <sides>3.0</sides>
      <shape>triangle</shape>
    </row>
  </data>"""
  
      output = geom_df.to_xml(
          index=False,
          elem_cols=["degrees", "sides", "shape"],
          parser=parser,
      )
      output = equalize_decl(output)
  
      assert output == elems_cols_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 21 for calling a global function with example usage: test_elems_cols_nan_output(parser, geom_df) without return types