def METHOD_NAME(
    definitions: dict[str, dict[str, Any] | list[dict[str, Any]]],
    definitions_raw: dict[str, list[tuple[int, str]]],
) -> dict[str, dict[str, Any]]:
    definitions_context: dict[str, dict[str, Any]] = {}
    for file_path, definition in definitions.items():
        file_path_context: dict[str, Any] = {}
        definition_raw = definitions_raw[file_path]
        if not isinstance(definition, list):
            logger.info(f"File {file_path} has the wrong type {type(definition)}")
            continue
        for code_block in definition:
            if ResourceType.TASKS in code_block:
                for task in code_block[ResourceType.TASKS]:
                    _process_blocks(definition_raw=definition_raw, file_path_context=file_path_context, task=task)
            else:
                _process_blocks(definition_raw=definition_raw, file_path_context=file_path_context, task=code_block)
        definitions_context[file_path] = file_path_context
    return definitions_context