(node_name)
return name_with_port
Makes sure that a tensor name has :0 if no explicit port exists.
Makes sure that a tensor name has :0 if no explicit port exists.
Makes sure that a tensor name has : 0 if no explicit port exists .
def ensure_tensor_name_has_port(node_name):
  """Makes sure that a tensor name has :0 if no explicit port exists."""
  m = re.search(r"(.*):\d+$", node_name)
  if m:
    name_with_port = node_name
  else:
    name_with_port = node_name + ":0"
  return name_with_port
def ensure_tensor_name_has_port ( node_name ) : m = re . search ( r"(.*):\d+$" , node_name ) if m : name_with_port = node_name else : name_with_port = node_name + ":0" return name_with_port