parameters: (node_name)
return_statement: return name_with_port
docstring: Makes sure that a tensor name has :0 if no explicit port exists.
docstring_summary: Makes sure that a tensor name has :0 if no explicit port exists.
docstring_tokens: Makes sure that a tensor name has : 0 if no explicit port exists .
function: 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
function_tokens: 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