<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def skip_if_needed(self, job_record):
 """ method is called from abstract_state_machine.manage_job to notify about job's failed processing if should_skip_node returns True - the node's job_record is transferred to STATE_SKIPPED """

        tree = self.get_tree(job_record.process_name)
        node = tree.get_node(job_record.process_name, job_record.timeperiod)
        if tree.should_skip_tree_node(node):
            self.skip_tree_node(node)