def swap_nibbles(data: str) -> str:
    """
    Swaps nibbles (semi-octets) in the PDU hex string and returns the result.

    Example:

    >>> swap_nibbles('0123')
    '1032'
    """
    res = ''
    for k in range(0, len(data), 2):
        res += data[k+1] + data[k]
    return res