<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _parse_w_comma_h(self, whstr, param):
 """Utility to parse "w,h" "w," or ",h" values. Returns (w,h) where w,h are either None or ineteger. Will throw a ValueError if there is a problem with one or both. """

        try:
            (wstr, hstr) = whstr.split(',', 2)
            w = self._parse_non_negative_int(wstr, 'w')
            h = self._parse_non_negative_int(hstr, 'h')
        except ValueError as e:
            raise IIIFRequestError(
                code=400, parameter=param,
                text="Illegal %s value (%s)." % (param, str(e)))
        if (w is None and h is None):
            raise IIIFRequestError(
                code=400, parameter=param,
                text="Must specify at least one of w,h for %s." % (param))
        return(w, h)