def preprocess_logic_form(lf, conversions: dict) -> list:
    """ Preprocess a single logic form. """
    new_lf = []
    for term in lf:
        if isinstance(term, list):
            term = preprocess_logic_form(term, conversions)
        elif isinstance(term, str):
            if conversions.get(term):
                term = conversions[term]
        new_lf.append(term)
    return new_lf