def METHOD_NAME(edge):
  """Converts PTransform properties to DOT edge attributes."""
  attrs = {}
  if edge.get('cached'):
    attrs['color'] = 'red'
  elif edge.get('referenced'):
    attrs['color'] = 'black'
  else:
    attrs['color'] = 'grey'
  return attrs