code: def tocimxml(value):
      # pylint: disable=line-too-long
        # noqa: E501
  
      if isinstance(value, (tuple, list)):
          array_xml = []
          for v in value:
              if v is None:
                  if SEND_VALUE_NULL:
                      array_xml.append(cim_xml.VALUE_NULL())
                  else:
                      array_xml.append(cim_xml.VALUE(None))
              else:
                  array_xml.append(cim_xml.VALUE(atomic_to_cim_xml(v)))
          value_xml = cim_xml.VALUE_ARRAY(array_xml)
          return value_xml
  
      if hasattr(value, 'tocimxml'):
          return value.tocimxml()
  
      if value is None:
          warnings.warn("A value of None for pywbem.tocimxml() has been "
                        "deprecated.",
                        DeprecationWarning, stacklevel=2)
  
      return cim_xml.VALUE(atomic_to_cim_xml(value))
docs: Return the CIM-XML representation of the input object,
      as an object of an appropriate subclass of :term:`Element`.
  
      The returned CIM-XML representation is consistent with :term:`DSP0201`.
  
      Parameters:
  
        value (:term:`CIM object`, :term:`CIM data type`, :term:`number`, :class:`py:datetime.datetime`, or tuple/list thereof):
          The input object.
  
          Specifying `None` has been deprecated in pywbem 0.12.
  
      Returns:
  
        The CIM-XML representation, as an object of an appropriate subclass of
        :term:`Element`.