'Gets the product type of a specified OMI or snapshot.
:param      image_id: The ID of the OMI
:type       image_id: ``string``
:param      snapshot_id: The ID of the snapshot
:type       snapshot_id: ``string``
:return:    A product type
:rtype:     ``dict``'

def ex_get_product_type(self, image_id, snapshot_id=None):

    params = {'Action': 'GetProductType'}
    params.update({'ImageId': image_id})
    if (snapshot_id is not None):
        params.update({'SnapshotId': snapshot_id})
    response = self.connection.request(self.path, params=params, method='GET').object
    product_type = self._to_product_type(response)
    return product_type
