code: def _matches_location(price, location):
      
      # the price has no location restriction
      if not price.get('locationGroupId'):
          return True
  
      # Check to see if any of the location groups match the location group
      # of this price object
      for group in location['location']['location']['priceGroups']:
          if group['id'] == price['locationGroupId']:
              return True
  
      return False
docs: Return True if the price object matches the location.