code: def _data_to_lxml_el(data, ns, nsmap, element_maker=None, snake=True):
      
      if not element_maker:
          element_maker = ElementMaker(namespace=nsmap[ns], nsmap=nsmap)
      tag = data[0]
      if snake:
          camel_tag = utils.snake_to_camel(tag)
      func = getattr(element_maker, camel_tag)
      args = []
      attributes = {}
      for element in data[1:]:
          if isinstance(element, dict):
              for key, val in element.items():
                  attributes[key] = val
          elif isinstance(element, (tuple, list)):
              args.append(
                  _data_to_lxml_el(
                      element, ns, nsmap, element_maker=element_maker, snake=snake
                  )
              )
          elif isinstance(element, six.text_type):
              args.append(element)
          elif isinstance(element, etree._Element):
              args.append(element)
          else:
              args.append(six.binary_type(element))
      ret = func(*args)
      for attr, val in attributes.items():
          try:
              ns, attr = attr.split(":")
          except ValueError:
              ns = None
          if snake:
              attr = utils.snake_to_camel(attr)
          if ns:
              attr = "{" + nsmap[ns] + "}" + attr
              ret.attrib[attr] = val
          else:
              ret.attrib[attr] = val
      return ret
docs: Convert tuple/list ``data`` to an ``lxml.etree._Element`` instance.
      :param tuple/list data: iterable whose first element is the snake-case
          string which is the name of the root XML element. Subsequent elements
          may be dicts (which encode XML attributes), tuples/lists (which encode
          sub-elements), or scalars (strings, ints or floats, which encode text
          under the element).
      :param str ns: the implicit namespace of all elements in the XML.
      :param dict nsmap: a dict of XML namespaces to define in the root element.
      :param ElementMaker element_maker: instance for creating XML elements.
      :returns: an ``lxml.etree._Element`` instance