<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _get_last_state(self, state_file):
 """Checks the given path for the last exported comment's id"""

        state = None
        fp = open(state_file)
        try:
            state = int(fp.read())
            print("Found previous state: %d" % (state,))
        finally:
            fp.close()
        return state