'Returns the default source_layer setting for this ComponentSpec.
Usually links are intended for a specific layer in the network unit.
For common network units, this returns the hidden layer intended
to be read by recurrent and cross-component connections.
Returns:
String name of default network layer.
Raises:
ValueError: if no default is known for the given setup.'

def default_source_layer(self):

    for (network, default_layer) in [('FeedForwardNetwork', 'layer_0'), ('LayerNormBasicLSTMNetwork', 'state_h_0'), ('LSTMNetwork', 'layer_0'), ('IdentityNetwork', 'input_embeddings')]:
        if self.spec.network_unit.registered_name.endswith(network):
            return default_layer
    raise ValueError(('No    default    source    for    network    unit:    %s' % self.spec.network_unit))
