@staticmethod
def _construct_range_header(boundaries):
    """
        Construct the correct value for the Range header, given a closed or open-ended range.

        :param boundaries:
            The range of bytes (inclusive)
        :type boundaries:
            (`int`) or (`int`, `int`)
        :returns:
            The value for the Range header
        :rtype:
            `unicode`
        :raises ValueError:
        """
    if len(boundaries) == 1:
        return 'bytes={0}-'.format(*boundaries)
    elif len(boundaries) == 2:
        return 'bytes={0}-{1}'.format(*boundaries)
    else:
        raise ValueError('Expected a 1-tuple or 2-tuple for byte range')
