def size_in_stock(item, size_str):
    """
    Example: has_size(item, '32x36')
    """
    for unit in item['units']:
        if unit['size'] == size_str and unit['stock'] > 0:
            return True
    return False
