code: def test_statistics_for_filters_by_filename():
      """Show we can retrieve the only statistic recorded."""
      aggregator = stats.Statistics()
      assert list(aggregator.statistics_for("E")) == []
      aggregator.record(make_error())
      aggregator.record(make_error(filename="example.py"))
  
      statistics = list(
          aggregator.statistics_for("E", DEFAULT_FILENAME)
      )
      assert len(statistics) == 1
      assert isinstance(statistics[0], stats.Statistic)
  
file_path: flake8/tests/unit/test_statistics.py
imports: from __future__ import annotations
  import pytest
  from flake8 import statistics
  from flake8.violation import Violation
label_desc: Use image node_id 8 for calling a global function with example usage: test_statistics_for_filters_by_filename() without return types