<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def draw_heading(self, writer):
 """ Conditionally redraw screen when ``dirty`` attribute is valued REFRESH. When Pager attribute ``dirty`` is ``STATE_REFRESH``, cursor is moved to (0,0), screen is cleared, and heading is displayed. :param writer: callable writes to output stream, receiving unicode. :returns: True if class attribute ``dirty`` is ``STATE_REFRESH``. """

        if self.dirty == self.STATE_REFRESH:
            writer(u''.join(
                (self.term.home, self.term.clear,
                 self.screen.msg_intro, '\n',
                 self.screen.header, '\n',)))
            return True