def compatible_channels(source_channel, sink_channel):
 source_type = name_lookup(source_channel.type)
 sink_type = name_lookup(sink_channel.type)
 ret = issubclass(source_type, sink_type)
 if source_channel.dynamic:
  ret = (ret or issubclass(sink_type, source_type))
 return ret

def compatible_channels ( source_channel , sink_channel ) : source_type = name_lookup ( source_channel . type ) sink_type = name_lookup ( sink_channel . type ) ret = issubclass ( source_type , sink_type ) if source_channel . dynamic : ret = ( ret or issubclass ( sink_type , source_type ) ) return ret
do the channels in link have compatible types .