<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _get_nits(self, filename):
 """Iterate over the instances style checker and yield Nits. :param filename: str pointing to a file within the buildroot. """

    try:
      python_file = PythonFile.parse(filename, root=self._root_dir)
    except CheckSyntaxError as e:
      yield e.as_nit()
      return

    if noqa_file_filter(python_file):
      return

    if self._excluder:
      # Filter out any suppressed plugins
      check_plugins = [(plugin_name, plugin_factory)
                       for plugin_name, plugin_factory in self._plugin_factories.items()
                       if self._excluder.should_include(filename, plugin_name)]
    else:
      check_plugins = self._plugin_factories.items()

    for plugin_name, plugin_factory in check_plugins:
      for i, nit in enumerate(plugin_factory(python_file)):
        if i == 0:
          # NB: Add debug log header for nits from each plugin, but only if there are nits from it.
          self.log.debug('Nits from plugin {} for {}'.format(plugin_name, filename))

        if not nit.has_lines_to_display:
          yield nit
          continue

        if all(not line_contains_noqa(line) for line in nit.lines):
          yield nit