code: def _process_cmap(cmap):
      '''
      Returns a kwarg dict suitable for a ColorScale
      '''
      option = {}
      if isinstance(cmap, str):
          option['scheme'] = cmap
      elif isinstance(cmap, list):
          option['colors'] = cmap
      else:
          raise ValueError('''`cmap` must be a string (name of a color scheme)
                           or a list of colors, but a value of {} was given
                           '''.format(cmap))
      return optiof _process_cmap(cmap):
      '''
      Returns a kwarg dict suitable for a ColorScale
      '''
      option = {}
      if isinstance(cmap, str):
          option['scheme'] = cmap
      elif isinstance(cmap, list):
          option['colors'] = cmap
      else:
          raise ValueError('''`cmap` must be a string (name of a color scheme)
                           or a list of colors, but a value of {} was given
                           '''.format(cmap))
      return option
docs: Returns a kwarg dict suitable for a ColorScale