from typing import List


def get_model_fields(model, remove: List[str] = []):
    """Get list of names of model fields and remove the ones provided via the
    `remove` argument."""
    fields = model._meta.get_fields()
    field_names = [f.name for f in fields]
    for entry in remove:
        try:
            field_names.remove(entry)
        except ValueError:
            pass

    return field_names