def get_drop_down_xml(name, command, labels, help='', values=None):
    """Get the XML content for a drop down menu when making a ParaView plugin."""

    def _enum(labels, values=None):
        if values is None:
            values = range(len(labels))
        els = []
        for i, lab in enumerate(labels):
            els.append('<Entry value="%d" text="%s"/>' % (values[i], lab))

        # formatter = r'%s\n'*len(els)
        dom = '''\
        <EnumerationDomain name="enum">'''
        for el in els:
            dom += (
                '''
          %s'''
                % el
            )
        dom += '''
        </EnumerationDomain>'''
        return dom, values

    domain, values = _enum(labels, values)
    return '''\
      <IntVectorProperty
        name="%s"
        command="%s"
        number_of_elements="1"
        default_values="%d">
%s
        <Documentation>
          %s
        </Documentation>
      </IntVectorProperty>''' % (
        name,
        command,
        values[0],
        domain,
        help,
    )