code: def _update_matplotlib_version():
      if PatchedMatplotlib._matplot_major_version:
          return
  
      # we support matplotlib version 2.0.0 and above
      try:
          import matplotlib
  
          version_split = matplotlib.__version__.split(".")
          PatchedMatplotlib._matplot_major_version = int(
              version_split[0]
          )
          PatchedMatplotlib._matplot_minor_version = int(
              version_split[1]
          )
  
          if running_remotely():
              # disable GUI backend - make headless
              matplotlib.rcParams["backend"] = "agg"
              import matplotlib.pyplot
  
              matplotlib.pyplot.switch_backend("agg")
  
      except Exception:
          pass
  
      # check backend support
      PatchedMatplotlib._update_matplotlib_image_support()
  
imports: import sys
  import threading
  from copy import deepcopy
  from tempfile import mkstemp
  import six
  from six import BytesIO
  from .import_bind import PostImportHookPatching
  from ..config import running_remotely
  from ..debugging.log import LoggerRoot
  from ..utilities.resource_monitor import ResourceMonitor
label_desc: Use image node_id 4 for calling the PatchedMatplotlib obj's underlying member method code with example usage: obj._update_matplotlib_version() without return types