def METHOD_NAME(nums):
    """
    Args:
        nums (list): List of sorted integer numbers.
    Yields:
        str: Group ranges as {start}-{end} if more than one number in the range
            else it yields {end}
    """
    start = None
    end = None
    def _result(a, b):
        if a == b:
            return "{}".format(a)
        else:
            return "{}-{}".format(a, b)
    for num in nums:
        if start is None:
            start = num
            end = num
        elif num == end + 1:
            end = num
        else:
            yield _result(start, end)
            start = num
            end = num
    if start is not None:
        yield _result(start, end)