code: def _convert_to_flatten_dict(list_of_tag_dicts):
      """Method to convert tags format.
  
      from:
          [{"Key": "tag1", "Value": "value1"}, {"Key": "tag2", "Value": "value2"}]
      to:
          {"tag1": "value1", "tag2":"value2"}
      """
      result_dict = {}
      for entry in list_of_tag_dicts:
          key = entry["Key"]
          value = entry["Value"]
          result_dict[key] = value
      return result_dict
  
imports: from __future__ import absolute_import
  import os.path
  import tarfile
  import logging
  import nbformat
  import pytest
  from sagemaker import get_execution_role
  from sagemaker.s3 import S3Downloader
  from sagemaker.s3_utils import s3_path_join
  from sagemaker.utils import name_from_base
  from sagemaker.workflow import ParameterString
  from sagemaker.workflow.notebook_job_step import NotebookJobStep
  from sagemaker.workflow.parameters import ParameterInteger, ParameterBoolean
  from sagemaker.workflow.pipeline import Pipeline
  from sagemaker.utils import _tmpdir
  from tests.integ.retry import retries
  from tests.integ.sagemaker.workflow.helpers import wait_pipeline_execution
  from tests.integ import kms_utils
  from sagemaker.workflow.function_step import step
label_desc: Use image node_id 8 for calling a global function with example usage: _convert_to_flatten_dict(list_of_tag_dicts) and returns: result_dict