class_docstr: Store per-platform/fn profiling results in a file.
  
  There was no json module available when this was written, but now
  the file format which is very deterministically line oriented is kind of
  handy in any case for diffs and merges.
code: def result(self, callcount):
      test_key = _current_test
      per_fn = self.data[test_key]
      per_platform = per_fn[self.platform_key]
  
      if "counts" not in per_platform:
          per_platform["counts"] = counts = []
      else:
          counts = per_platform["counts"]
  
      if "current_count" not in per_platform:
          per_platform["current_count"] = current_count = 0
      else:
          current_count = per_platform["current_count"]
  
      has_count = len(counts) > current_count
  
      if not has_count:
          counts.append(callcount)
          if self.write:
              self._write()
          result = None
      else:
          result = per_platform["lineno"], counts[current_count]
      per_platform["current_count"] += 1
      return result
  
imports: from __future__ import annotations
  import collections
  import contextlib
  import os
  import platform
  import pstats
  import re
  import sys
  from .None import config
  from .util import gc_collect
  from ..util import has_compiled_ext
label_desc: Use image node_id 4 for calling the ProfileStatsFile obj's underlying member method code with example usage: obj.result(callcount) and returns: result