code: def test_key_creation():
      """Verify how we create Keys from Errors."""
      key = stats.Key.create_from(make_error())
      assert key == (DEFAULT_FILENAME, DEFAULT_ERROR_CODE)
      assert key.filename == DEFAULT_FILENAME
      assert key.code == DEFAULT_ERROR_CODE
  
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 2 for calling a global function with example usage: test_key_creation() without return types