def _canonicalize_output_name(name):
  # type: (str) -> str
  """
  Args:
    name: Name for an op output as it would appear in the protocol buffer
      representation of a an node graph
  Returns:
    A name in the form "<op name>:<output index>"
  """
  if ":" in name:
    return name
  else:
    return name + ":0"