docs: def _get_layout_as_etree(layout_dict):
      """
      Convert something that looks like this:
      {
          'color' : ['red'],
          'shapefile' : ['blah.shp']
      }
  
      Into something that looks like this:
      <layout>
          <item>
              <name>color</name>
              <value>red</value>
          </item>
          <item>
              <name>shapefile</name>
              <value>blah.shp</value>
          </item>
      </layout>
      """
      if layout_dict is None:
          return None
  
      layout = etree.Element("layout")
      layout_dict = eval(layout_dict)
      for k, v in layout_dict.items():
          item = etree.SubElement(layout, "item")
          name = etree.SubElement(item, "name")
          name.text = k
          value = etree.SubElement(item, "value")
          value.text = str(v)
  
      return layout