from typing import List


def _perform_shift(words: List[str], start: int, length: int, target: int) -> List[str]:
    """Perform a shift in `words` from `start` to `target`.

    :param words: Words to shift.
    :param start: Where from.
    :param length: How many words.
    :param target: Where to.
    :return: Shifted words.
    """
    if target < start:
        # shift before previous position
        return (words[:target] + words[start:start+length]
                + words[target:start] + words[start+length:])
    elif target > start + length:
        # shift after previous position
        return (words[:start] + words[start+length:target]
                + words[start:start+length] + words[target:])
    else:
        # shift within the shifted string
        return (words[:start] + words[start+length:length+target]
                + words[start:start+length] + words[length+target:])