<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def invalidate_files(self, direct_filenames):
 """Invalidates the given filenames in an internal product Graph instance."""

    invalidated = self._scheduler.invalidate_files(direct_filenames)
    self._maybe_visualize()
    return invalidated