code: def write_json_into(self, file) -> None:
      json.dump(self, file, cls=_EncodeTestResult)
  
imports: import dataclasses
  import json
  from typing import Any
  from .utils import StrJSON, TestName, FilterTuple, format_duration, normalize_test_name, print_warning
label_desc: Use image node_id 8 for calling the TestResult obj's underlying member method code with example usage: obj.write_json_into(file) without return types