def get_call(host: str, span: int=1) ->str:
    """
    Gets the Callsign from the Hostname.
    Given a Span, will extract that many sections of the callsign.

    For example:
    - span=1 would extract 'W2GMD' from W2GMD-SUNSET-5G-1
    - span=2 would extract 'W2GMD-SUNSET' from W2GMD-SUNSET-5G-1

    :param host: Hostname from which to extract callsign.
    :param span: Number of sections of callsign to extract.
    :return:
    """
    if '-' in host:
        segments = host.split('-')
        if len(segments) >= 1:
            if span == 0:
                return segments[0].upper()
            else:
                return ''.join(segments[:span]).upper()
        else:
            return host.upper()
    else:
        return host.upper()
