'Retrieves an attribute (e.g. input_tensors) from a node.
This is used to implement the methods:
- get_input_shape_at
- get_output_shape_at
- get_input_at
etc...
# Arguments
node_index: Integer index of the node from which
to retrieve the attribute.
attr: Exact node attribute name.
attr_name: Human-readable attribute name, for error messages.
# Returns
The layer\'s attribute `attr` at the node of index `node_index`.
# Raises
RuntimeError: If the layer has no inbound nodes.
ValueError: If the index is does not match any node.'

def _get_node_attribute_at_index(self, node_index, attr, attr_name):

    if (not self.inbound_nodes):
        raise RuntimeError((('The    layer    has    never    been    called    and    thus    has    no    defined    ' + attr_name) + '.'))
    if (not (len(self.inbound_nodes) > node_index)):
        raise ValueError((((((('Asked    to    get    ' + attr_name) + '    at    node    ') + str(node_index)) + ',    but    the    layer    has    only    ') + str(len(self.inbound_nodes))) + '    inbound    nodes.'))
    values = getattr(self.inbound_nodes[node_index], attr)
    if (len(values) == 1):
        return values[0]
    else:
        return values
