<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def auto_delete_files_on_instance_delete(instance: Any, fieldnames: Iterable[str]) -> None: """ Deletes files from filesystem when object is deleted. """

    for fieldname in fieldnames:
        filefield = getattr(instance, fieldname, None)
        if filefield:
            if os.path.isfile(filefield.path):
                os.remove(filefield.path)