code: def black_bg_subplot(*args, **kwargs):
      """Create a subplot with black background"""
  
      if int(matplotlib.__version__[0]) >= 2:
          kwargs["facecolor"] = "k"
      else:
          kwargs["axisbg"] = "k"
  
      ax = plt.subplot(*args, **kwargs)
  
      # set ticks and labels to white
      for spine in ax.spines.values():
          spine.set_color("w")
  
      for tick in (
          ax.xaxis.get_major_ticks() + ax.yaxis.get_major_ticks()
      ):
          for child in tick.get_children():
              child.set_color("w")
  
      return ax
  
imports: import numpy
  import matplotlib
  from matplotlib import pyplot
  from astroML.datasets import fetch_moving_objects
  from astroML.plotting.tools import devectorize_axes
label_desc: Use image node_id 1 for calling a global function with example usage: black_bg_subplot() and returns: ax