code: def _get_item(list_containing_dicts_entries, attribute_value,
                    attribute_name='subnet_id'):
          
          for item in list_containing_dicts_entries:
              if item.get(attribute_name) == attribute_value:
                  return item
          return {}
docs: Searches a list of dicts and returns the first matching entry
  
          The dict entry returned contains the attribute 'attribute_name' whose
          value equals 'attribute_value'. If no such dict is found in the list
          an empty dict is returned.