code: def convert_tags_to_dict(item):
      
      if hasattr(item, 'tags'):
          tags = item.tags
          if isinstance(tags, list):
              tags_dict = {}
              for kv_dict in tags:
                  if isinstance(kv_dict, dict) and 'Key' in kv_dict and 'Value' in kv_dict:
                      tags_dict[kv_dict['Key']] = kv_dict['Value']
              return ObjectProxy(item, tags=tags_dict)
      return item
docs: Convert AWS inconvenient tags model of a list of {"Key": <key>, "Value": <value>} pairs
      to a dict of {<key>: <value>} for easier querying.
  
      This returns a proxied object over given item to return a different tags format as the tags
      attribute is read-only and we cannot modify it directly.