def _update_aws_include_relative_path(template_dict, original_root, new_root):
for key, val in template_dict.items():<EOL><INDENT>if key == "<STR_LIT>":<EOL><INDENT>if isinstance(val, dict) and val.get("<STR_LIT:Name>") == "<STR_LIT>":<EOL><INDENT>path = val.get("<STR_LIT>", {}).get("<STR_LIT>", {})<EOL>updated_path = _resolve_relative_to(path, original_root, new_root)<EOL>if not updated_path:<EOL><INDENT>continue<EOL><DEDENT>val["<STR_LIT>"]["<STR_LIT>"] = updated_path<EOL><DEDENT><DEDENT>elif isinstance(val, dict):<EOL><INDENT>_update_aws_include_relative_path(val, original_root, new_root)<EOL><DEDENT>elif isinstance(val, list):<EOL><INDENT>for item in val:<EOL><INDENT>if isinstance(item, dict):<EOL><INDENT>_update_aws_include_relative_path(item, original_root, new_root)<EOL><DEDENT><DEDENT><DEDENT><DEDENT>return template_dict<EOL>
Update relative paths in "AWS::Include" directive. This directive can be present at any part of the template,
and not just within resources.