code: def _try_import_matplotlib():
      global matplotlib, _available
      try:
          import matplotlib  # NOQA
  
          _available = True
      except (ImportError, TypeError):
          _available = False
  
file_path: chainer/chainer/training/extensions/plot_report.py
imports: import json
  from os import path
  import warnings
  import numpy
  import six
  from chainer import reporter
  from chainer import serializer
  from chainer.training import extension
  from chainer.training import trigger
  from chainer.utils import argument
label_desc: Use image node_id 1 for calling a global function with example usage: _try_import_matplotlib() without return types