<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _get_os_price_id(items, os, location):
 """Returns the price id matching."""


    for item in items:
        if any([utils.lookup(item,
                             'itemCategory',
                             'categoryCode') != 'os',
                utils.lookup(item,
                             'softwareDescription',
                             'referenceCode') != os]):
            continue

        for price in item['prices']:
            if not _matches_location(price, location):
                continue

            return price['id']

    raise SoftLayer.SoftLayerError("Could not find valid price for os: '%s'" %
                                   os)