@classmethod
def from_match_dict(cls, match_dict):
    """
        Construct a :class:`Byterange` given a groupdict from ``BYTERANGE_RE``

        :param match_dict: (:class:`dict`) the ``match_dict``.
        :return: (:class:`Byterange`) The instance for the provided string.
        """
    byterange = cls(count=int(match_dict['n']))
    try:
        byterange.offset = int(match_dict['o'])
    except KeyError:
        pass
    return byterange
