<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def replace_placeholders(path: Path, properties: Dict[str, str]):
    '''Replace placeholders in a file with the values from the mapping.'''

    with open(path, encoding='utf8') as file:
        file_content = Template(file.read())

    with open(path, 'w', encoding='utf8') as file:
        file.write(file_content.safe_substitute(properties))