<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def parse(cls, fileobj):
 """Returns a parsed instance of the called type. The file position is right after the descriptor after this returns. Raises DescriptorError """


        try:
            length = cls._parse_desc_length_file(fileobj)
        except ValueError as e:
            raise DescriptorError(e)
        pos = fileobj.tell()
        instance = cls(fileobj, length)
        left = length - (fileobj.tell() - pos)
        if left < 0:
            raise DescriptorError("descriptor parsing read too much data")
        fileobj.seek(left, 1)
        return instance