code: def exclude_by_filter(self, filename, module_name):
          '''
          :return: True if it should be excluded, False if it should be included and None
              if no rule matched the given file.
          '''
          for exclude_filter in self._exclude_filters:  # : :type exclude_filter: ExcludeFilter
              if exclude_filter.is_path:
                  if glob_matches_path(filename, exclude_filter.name):
                      if exclude_filter.exclude:
                          pydev_log.debug("File %s ignored by filter %s" % (filename, exclude_filter.name))
                      return exclude_filter.exclude
              else:
                  # Module filter.
                  if exclude_filter.name == module_name or module_name.startswith(exclude_filter.name + '.'):
                      return exclude_filter.exclude
          return Nonf exclude_by_filter(self, filename, module_name):
          '''
          :return: True if it should be excluded, False if it should be included and None
              if no rule matched the given file.
          '''
          for exclude_filter in self._exclude_filters:  # : :type exclude_filter: ExcludeFilter
              if exclude_filter.is_path:
                  if glob_matches_path(filename, exclude_filter.name):
                      if exclude_filter.exclude:
                          pydev_log.debug("File %s ignored by filter %s" % (filename, exclude_filter.name))
                      return exclude_filter.exclude
              else:
                  # Module filter.
                  if exclude_filter.name == module_name or module_name.startswith(exclude_filter.name + '.'):
                      return exclude_filter.exclude
          return None
docs: :return: True if it should be excluded, False if it should be included and None
              if no rule matched the given file.