<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def deserialize(doc_xml, pyxb_binding=None):
 """Deserialize DataONE XML types to PyXB. Args: doc_xml: UTF-8 encoded ``bytes`` pyxb_binding: PyXB binding object. If not specified, the correct one should be selected automatically. Returns: PyXB object See Also: ``deserialize_d1_exception()`` for deserializing DataONE Exception types. """

    pyxb_binding = pyxb_binding or d1_common.types.dataoneTypes
    try:
        return pyxb_binding.CreateFromDocument(doc_xml)
    except pyxb.ValidationError as e:
        raise ValueError(
            'Unable to deserialize XML to PyXB. error="{}" xml="{}"'.format(
                e.details(), doc_xml
            )
        )
    except (pyxb.PyXBException, xml.sax.SAXParseException, Exception) as e:
        raise ValueError(
            'Unable to deserialize XML to PyXB. error="{}" xml="{}"'.format(
                str(e), doc_xml
            )
        )