from typing import Dict


def preprocess_sd(sd: Dict):
    """
    Removes module. from state dict.

    Args:
        sd: input state dict

    Returns:
        preprocessed state dict
    """
    preprocessed = {}
    for key in sd.keys():
        preprocessed[key[7:]] = sd[key]
    return preprocessed