code: def check_if_networks_compatible(networks):
      input_shapes = []
      output_shapes = []
  
      for i, network in enumerate(networks):
          input_shapes.append(network.input_shape)
          output_shapes.append(network.output_shape)
  
      for shape in input_shapes:
          if not shape.is_compatible_with(input_shapes[0]):
              raise ValueError(
                  "Networks have incompatible input shapes. Shapes: {}"
                  "".format(tf_utils.shape_to_tuple(input_shapes))
              )
  
      for shape in output_shapes:
          if not shape.is_compatible_with(output_shapes[0]):
              raise ValueError(
                  "Networks have incompatible output shapes. Shapes: {}"
                  "".format(tf_utils.shape_to_tuple(output_shapes))
              )
  
imports: import tensorflow
  from neupy import layers
  from neupy.utils import tf_utils, as_tuple
  from neupy.layers.base import BaseGraph
label_desc: Use image node_id 2 for calling a global function with example usage: check_if_networks_compatible(networks) without return types