parameters: (name)
docstring: Get the node name from a string that can be node or tensor name.
  
    Args:
      name: An input node name (e.g., "node_a") or tensor name (e.g.,
        "node_a:0"), as a str.
  
    Returns:
      1) The node name, as a str. If the input name is a tensor name, i.e.,
        consists of a colon, the final colon and the following output slot
        will be stripped.
      2) If the input name is a tensor name, the output slot, as an int. If
        the input name is not a tensor name, None.
docstring_summary: Get the node name from a string that can be node or tensor name.
docstring_tokens: Get the node name from a string that can be node or tensor name .
function: def parse_node_or_tensor_name(name):
    """Get the node name from a string that can be node or tensor name.
  
    Args:
      name: An input node name (e.g., "node_a") or tensor name (e.g.,
        "node_a:0"), as a str.
  
    Returns:
      1) The node name, as a str. If the input name is a tensor name, i.e.,
        consists of a colon, the final colon and the following output slot
        will be stripped.
      2) If the input name is a tensor name, the output slot, as an int. If
        the input name is not a tensor name, None.
    """
  
    if ":" in name and not name.endswith(":"):
      node_name = name[:name.rfind(":")]
      output_slot = int(name[name.rfind(":") + 1:])
  
      return node_name, output_slot
    else:
      return name, None
function_tokens: def parse_node_or_tensor_name ( name ) : if ":" in name and not name . endswith ( ":" ) : node_name = name [ : name . rfind ( ":" ) ] output_slot = int ( name [ name . rfind ( ":" ) + 1 : ] ) return node_name , output_slot else : return name , None