def parse(self, file, boundary, content_length):
    (formstream, filestream) = tee(self.parse_parts(file, boundary, content_length), 2)
    form = (p[1] for p in formstream if (p[0] == 'form'))
    files = (p[1] for p in filestream if (p[0] == 'file'))
    return (self.cls(form), self.cls(files))
def parse(self, file, boundary, content_length):
    (formstream, filestream) = tee(self.parse_parts(file, boundary, content_length), 2)
    form = (p[1] for p in formstream if (p[0] == 'form'))
    files = (p[1] for p in filestream if (p[0] == 'file'))
    return (self.cls(form), self.cls(files))