code: def autocrop_array_shapes(input_shapes, cropping):
      """
      Computes the shapes of the given arrays after auto-cropping is applied.
  
      For more information on cropping, see the :func:`autocrop` function
      documentation.
  
      Parameters
      ----------
      input_shapes : the shapes of input arrays prior to cropping in
          the form of a list of tuples
  
      cropping : a list of cropping modes, one for each axis. If length of
          `cropping` is less than the number of axes in the inputs, it is
          padded with `None`. If `cropping` is None, `input_shapes` is returned
          as is. For more information on their values and operation, see the
          :func:`autocrop` documentation.
  
      Returns
      -------
      list of tuples
          each tuple is a cropped version of the corresponding input
          shape tuple in `input_shapes`
  
      For example, given three input shapes with 4 axes each:
  
      >>> a = (1, 2, 3, 4)
      >>> b = (5, 4, 4, 2)
      >>> c = (7, 1, 8, 9)
  
      Cropping mode for each axis:
  
      >>> cropping = [None, 'lower', 'center', 'upper']
  
      Apply:
  
      >>> cropped_shapes = autocrop_array_shapes([a, b, c], cropping)
      >>> cropped_shapes[0]
      (1, 1, 3, 2)
  
      >>> cropped_shapes[1]
      (5, 1, 3, 2)
  
      >>> cropped_shapes[2]
      (7, 1, 3, 2)
  
      Note that axis 0 remains unchanged, where all the others are cropped
      to the minimum size in that axis.
      """
      if cropping is None:
          return input_shapes
      else:
          # Check for consistent number of dimensions
          ndim = len(input_shapes[0])
          if not all(len(sh) == ndim for sh in input_shapes):
              raise ValueError(
                  "Not all inputs are of the same "
                  "dimensionality. Got {0} inputs of "
                  "dimensionalities {1}.".format(
                      len(input_shapes),
                      [len(sh) for sh in input_shapes],
                  )
              )
  
          result = []
  
          # If there are more dimensions than cropping entries, pad
          # the cropping
          cropping = list(cropping)
          if ndim > len(cropping):
              cropping = list(cropping) + [None] * (
                  ndim - len(cropping)
              )
  
          for sh, cr in zip(zip(*input_shapes), cropping):
              if cr is None:
                  result.append(sh)
              elif cr in {"lower", "center", "upper"}:
                  min_sh = (
                      None if any(x is None for x in sh) else min(sh)
                  )
                  result.append([min_sh] * len(sh))
              else:
                  raise ValueError("Unknown crop mode '{0}'".format(cr))
          return [tuple(sh) for sh in zip(*result)]
  
file_path: Lasagne/lasagne/layers/merge.py
imports: import theano.tensor
  from .base import MergeLayer
label_desc: Use image node_id 2 for calling a global function with example usage: autocrop_array_shapes(input_shapes, cropping) and returns: input_shapes, unknown