def _update_imports(new_imports: list, old_imports: list) -> list:
    """Update imports.

    Compare the old imports against the new ones and returns the old imports
    with the new imports that did not existed previously.

    :param new_imports: All new imports.
    :param old_imports: All old imports.
    :return: A list of imports as strings.
    """
    not_in_imports = []
    for i in new_imports:
        already = False
        for j in old_imports:
            if i == j:
                already = True
        if not already:
            not_in_imports.append(i)
    # Merge the minimum imports
    imports = old_imports + not_in_imports
    return imports