<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def validate_scenario(blocks, scenario_directory):
 """Function to validate input layer stored in scenario file. Check whether the files that are used in scenario file need to be updated or not. :param blocks: dictionary from read_scenarios :type blocks: dictionary :param scenario_directory: directory where scenario text file is saved :type scenario_directory: file directory :return: pass message to dialog and log detailed status """

    # dictionary to temporary contain status message
    blocks_update = {}
    for section, section_item in list(blocks.items()):
        ready = True
        for item in section_item:
            if item in ['hazard', 'exposure', 'aggregation']:
                # get relative path
                rel_path = section_item[item]
                full_path = os.path.join(scenario_directory, rel_path)
                filepath = os.path.normpath(full_path)
                if not os.path.exists(filepath):
                    blocks_update[section] = {
                        'status': 'Please update scenario'}
                    LOGGER.info(section + ' needs to be updated')
                    LOGGER.info('Unable to find ' + filepath)
                    ready = False
        if ready:
            blocks_update[section] = {'status': 'Scenario ready'}
            # LOGGER.info(section + " scenario is ready")
    for section, section_item in list(blocks_update.items()):
        blocks[section]['status'] = blocks_update[section]['status']