class_docstr: Benchmarks is a simple but feature-complete benchmarking script to compare memory and time performance of models in
  Transformers.
code: def environment_info(self):
      if self._environment_info is None:
          info = {}
          info["transformers_version"] = version
          info["framework"] = self.framework
          if self.framework == "PyTorch":
              info["use_torchscript"] = self.args.torchscript
          if self.framework == "TensorFlow":
              info["eager_mode"] = self.args.eager_mode
              info["use_xla"] = self.args.use_xla
          info["framework_version"] = self.framework_version
          info["python_version"] = platform.python_version()
          info["system"] = platform.system()
          info["cpu"] = platform.processor()
          info["architecture"] = platform.architecture()[0]
          info["date"] = datetime.date(datetime.now())
          info["time"] = datetime.time(datetime.now())
          info["fp16"] = self.args.fp16
          info["use_multiprocessing"] = self.args.do_multi_processing
          info["only_pretrain_model"] = self.args.only_pretrain_model
  
          if is_psutil_available():
              info["cpu_ram_mb"] = bytes_to_mega_bytes(
                  psutil.virtual_memory().total
              )
          else:
              logger.warning(
                  "Psutil not installed, we won't log available CPU memory. "
                  "Install psutil (pip install psutil) to log available CPU memory."
              )
              info["cpu_ram_mb"] = "N/A"
  
          info["use_gpu"] = self.args.is_gpu
          if self.args.is_gpu:
              info[
                  "num_gpus"
              ] = 1  # TODO(PVP) Currently only single GPU is supported
              if is_py3nvml_available():
                  nvml.nvmlInit()
                  handle = nvml.nvmlDeviceGetHandleByIndex(
                      self.args.device_idx
                  )
                  info["gpu"] = nvml.nvmlDeviceGetName(handle)
                  info["gpu_ram_mb"] = bytes_to_mega_bytes(
                      nvml.nvmlDeviceGetMemoryInfo(handle).total
                  )
                  info["gpu_power_watts"] = (
                      nvml.nvmlDeviceGetPowerManagementLimit(handle)
                      / 1000
                  )
                  info[
                      "gpu_performance_state"
                  ] = nvml.nvmlDeviceGetPerformanceState(handle)
                  nvml.nvmlShutdown()
              else:
                  logger.warning(
                      "py3nvml not installed, we won't log GPU memory usage. "
                      "Install py3nvml (pip install py3nvml) to log information about GPU."
                  )
                  info["gpu"] = "N/A"
                  info["gpu_ram_mb"] = "N/A"
                  info["gpu_power_watts"] = "N/A"
                  info["gpu_performance_state"] = "N/A"
  
          info["use_tpu"] = self.args.is_tpu
          # TODO(PVP): See if we can add more information about TPU
          # see: https://github.com/pytorch/xla/issues/2180
  
          self._environment_info = info
      return self._environment_info
  
imports: import copy
  import csv
  import linecache
  import os
  import platform
  import sys
  import warnings
  from abc import ABC, abstractmethod
  from collections import defaultdict, namedtuple
  from datetime import datetime
  from multiprocessing import Pipe, Process, Queue
  from multiprocessing.connection import Connection
  from typing import Callable, Iterable, List, NamedTuple, Optional, Union
  from ..None import AutoConfig, PretrainedConfig
  from ..None import __version__
  from ..utils import is_psutil_available, is_py3nvml_available, is_tf_available, is_torch_available, logging
  from .benchmark_args_utils import BenchmarkArguments
label_desc: Use image node_id 13 for calling the Benchmark obj's underlying member method code with example usage: obj.environment_info() and returns: self