code: def data_to_premis(data, premis_version=utils.PREMIS_VERSION):
      
      nsmap = utils.PREMIS_VERSIONS_MAP[premis_version]["namespaces"]
      return _data_to_lxml_el(data, "premis", nsmap)
docs: Given tuple ``data`` representing a PREMIS entity (object, event or
      agent), return an ``lxml.etree._Element`` instance. E.g.,::
  
          >>> p = data_to_premis((
              'event',
              utils.PREMIS_META,
              (
                  'event_identifier',
                  ('event_identifier_type', 'UUID'),
                  ('event_identifier_value', str(uuid4()))
              )
          ))
          >>> etree.tostring(p, pretty_print=True).decode('utf8')
          '''<premis:event
              xmlns:premis="info:lc/xmlns/premis-v2"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              version="2.2"
              xsi:schemaLocation="info:lc/xmlns/premis-v2 http://www.loc.gov/standards/premis/v2/premis-v2-2.xsd">
              <premis:eventIdentifier>
                  <premis:eventIdentifierType>UUID</premis:eventIdentifierType>
                  <premis:eventIdentifierValue>f4b7758f-e7b2-4155-9b56-d76965849fc1</premis:eventIdentifierValue>
              </premis:eventIdentifier>
          </premis:event>'''