def replace_conditional(record: dict, field: str, value: str, replacement: str):
    """
    Function to conditionally replace a value in a field.

    Parameters
    ----------
    record : dict
        Input record.
    field : str
        Key of field to be conditionally altered.
    value : str
        Value to identify and replace.
    replacement : str
        Value to insert on replacement.

    Returns
    -------
    type
        Record with specified key altered if `record[key] == value`. Otherwise, the original record is returned.

    """

    if record[field] == value:

        record[field] = replacement

    return(record)