def genPPG(prices, weights):
    """
        Generates low and high price per gram amounts for an item
        returns an array, with first element being low, and second element being high
            if there is only one variant of an item, a single element array will be returned
    """
    try:
        assert(prices is not None and weights is not None)
        print("PRICES: {}, WEIGHTS: {}".format(prices, weights))
        if len(prices) == 1 and len(weights) == 1:
            return round(float(prices[0]) / float(weights[0]), 2)
        else:
            return [
                round(float(min(prices)) / float(min(weights)), 2),
                round(float(max(prices)) / float(max(weights)), 2)
            ]
    except TypeError:
        return None
    except AssertionError as e:
        print("AssertionError Caught in genPPG")
        return []