<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def knit(self, input_file, opts_chunk='eval=FALSE'):
 """Use Knitr to convert the r-markdown input_file into markdown, returning a file object. """

        # use temporary files at both ends to allow stdin / stdout
        tmp_in = tempfile.NamedTemporaryFile(mode='w+')
        tmp_out = tempfile.NamedTemporaryFile(mode='w+')

        tmp_in.file.write(input_file.read())
        tmp_in.file.flush()
        tmp_in.file.seek(0)

        self._knit(tmp_in.name, tmp_out.name, opts_chunk)
        tmp_out.file.flush()
        return tmp_out