Return pair of (min,max)-elements values for `stmt`.

        `stmt` must be a 'list' or 'leaf-list'. Applicable refinements
        from `refine_dict` are also taken into account.

def get_minmax(self, stmt, refine_dict):
        """Return pair of (min,max)-elements values for `stmt`.

        `stmt` must be a 'list' or 'leaf-list'. Applicable refinements
        from `refine_dict` are also taken into account.
        """
        minel = refine_dict["min-elements"]
        maxel = refine_dict["max-elements"]
        if minel is None:
            minst = stmt.search_one("min-elements")
            if minst:
                minel = minst.arg
            else:
                minel = "0"
        if maxel is None:
            maxst = stmt.search_one("max-elements")
            if maxst:
                maxel = maxst.arg
        if maxel == "unbounded": maxel = None
        return (minel, maxel)