code: def _exclude_by_filter(self, frame, filename):
          '''
          :param str filename:
              The filename to filter.
  
          :return: True if it should be excluded, False if it should be included and None
              if no rule matched the given file.
          '''
          try:
              return self._exclude_by_filter_cache[filename]
          except KeyError:
              cache = self._exclude_by_filter_cache
  
              abs_real_path_and_basename = get_abs_path_real_path_and_base_from_file(filename)
              # pydevd files are always filtered out
              if self.get_file_type(abs_real_path_and_basename) == self.PYDEV_FILE:
                  cache[filename] = True
              else:
                  module_name = None
                  if self._files_filtering.require_module:
                      module_name = frame.f_globals.get('__name__')
                  cache[filename] = self._files_filtering.exclude_by_filter(filename, module_name)
  
              return cache[filenamef _exclude_by_filter(self, frame, filename):
          '''
          :param str filename:
              The filename to filter.
  
          :return: True if it should be excluded, False if it should be included and None
              if no rule matched the given file.
          '''
          try:
              return self._exclude_by_filter_cache[filename]
          except KeyError:
              cache = self._exclude_by_filter_cache
  
              abs_real_path_and_basename = get_abs_path_real_path_and_base_from_file(filename)
              # pydevd files are always filtered out
              if self.get_file_type(abs_real_path_and_basename) == self.PYDEV_FILE:
                  cache[filename] = True
              else:
                  module_name = None
                  if self._files_filtering.require_module:
                      module_name = frame.f_globals.get('__name__')
                  cache[filename] = self._files_filtering.exclude_by_filter(filename, module_name)
  
              return cache[filename]
docs: :param str filename:
              The filename to filter.
  
          :return: True if it should be excluded, False if it should be included and None
              if no rule matched the given file.