<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def modified_lines(self, r, file_name):
 """Returns the line numbers of a file which have been changed."""

        cmd = self.file_diff_cmd(r, file_name)
        diff = shell_out_ignore_exitcode(cmd, cwd=self.root)
        return list(self.modified_lines_from_diff(diff))