code: def get_cmap():
      """
      http://stackoverflow.com/questions/37517587/how-can-i-change-the-intensity-of-a-colormap-in-matplotlib
      """
      cmap = cm.get_cmap(
          "RdBu", 256
      )  # set how many colors you want in color map
      # modify colormap
      alpha = 1.0
      colors = []
      for ind in range(cmap.N):
          c = []
          if ind < 128 or ind > 210:
              continue
          for x in cmap(ind)[:3]:
              c.append(min(1, x * alpha))
          colors.append(tuple(c))
      my_cmap = matplotlib.colors.ListedColormap(colors, name="my_name")
      return my_cmap
  
file_path: NeuroNER/neuroner/utils_plots.py
imports: from __future__ import print_function
  from __future__ import division
  import matplotlib
  from matplotlib import cm
  import matplotlib.pyplot
  import numpy
  import sklearn.preprocessing
label_desc: Use image node_id 1 for calling a global function with example usage: get_cmap() and returns: my_cmap