<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def htmlReadFd(fd, URL, encoding, options):
 """parse an XML from a file descriptor and build a tree. """

    ret = libxml2mod.htmlReadFd(fd, URL, encoding, options)
    if ret is None:raise treeError('htmlReadFd() failed')
    return xmlDoc(_obj=ret)