<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def find_children(self, linespec):
 """Find lines and immediate children that match the linespec regex. :param linespec: regular expression of line to match :returns: list of lines. These correspond to the lines that were matched and their immediate children """

        res = []
        for parent in self.find_objects(linespec):
            res.append(parent.line)
            res.extend([child.line for child in parent.children])
        return res