code: def print_json(self, fp=sys.stdout):
      def date_handler(obj):
          if hasattr(obj, "isoformat"):
              return obj.isoformat()
          else:
              raise TypeError(type(obj))
  
      o = self.jsonify()
      json.dump(
          o, fp, indent=4, separators=(",", ": "), default=date_handler
      )
      fp.write("\n")
      fp.flush()
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  import json
  import platform
  import sys
  from datetime import datetime
  import psutil
  from ..gpu import pynvml
label_desc: Use image node_id 9 for calling the GPUStatCollection obj's underlying member method code with example usage: obj.print_json(fp) and returns: obj