def choose_color_by_layertype(layertype):
  """Define colors for nodes based on the layer type
  """
  color = '#6495ED'  # Default
  if layertype == 'Conv':
      color = '#FF5050'
  elif layertype == 'Embedding':
      color = '#FF9900'
  elif layertype == 'FullConnect':
      color = '#CC33FF'
  elif layertype == 'MaxPooling' or layertype == 'AvgPooling' or layertype == 'DynamicPooling':
      color = '#66CC66'
  elif layertype == 'Lstm' or layertype == 'Gru':
      color = '#B5E61D'
  return color