class_docstr: Perform body repeatly while the condition cond is true.
  
  Parameters
  ----------
  _cond: Python function  (Required)
      * A Python function that takes ``loop_vars`` as positional arguments. The function must return a bool Var.
  
  _body: Python function  (Required)
      * A Python function that takes ``loop_vars`` as positional arguments. The function must return the same number of output vars as ``loop_var`` with the same types.
  
  loop_vars: Python tuple (Required)
      * Python tuple of ``Variables``.
  
  Returns
  -------
  Python tuple
      * Same type as ``loop_vars``
class_docstr_tok: ["Perform","body","repeatly","while","the","condition","cond","is","true",".","Parameters","--","--","--","--","--","_cond",":","Python","function","(","Required",")","*","A","Python","function","that","takes","``","loop_vars","``","as","positional","arguments",".","The","function","must","return","a","bool","Var",".","_body",":","Python","function","(","Required",")","*","A","Python","function","that","takes","``","loop_vars","``","as","positional","arguments",".","The","function","must","return","the","same","number","of","output","vars","as","``","loop_var","``","with","the","same","types",".","loop_vars",":","Python","tuple","(","Required",")","*","Python","tuple","of","``","Variables","``",".","Returns","--","--","--","-","Python","tuple","*","Same","type","as","``","loop_vars","``"]
docstr: For tensor types `type1`, `type2` that are of the same rank, return
  compat_shape (python list) where compat_shape[i] is integer iff type1
  and type2 have the same integer shape on dim i. compat_shape[i] is
  symbolic otherwise.
  
  Return None if `type1`, `type2` have different rank or non-tensor
  type.
docstr_tok: ["For","tensor","types","`","type1","`",",","`","type2","`","that","are","of","the","same","rank",",","return","compat_shape","(","python","list",")","where","compat_shape","[","i","]","is","integer","iff","type1","and","type2","have","the","same","integer","shape","on","dim","i.","compat_shape","[","i","]","is","symbolic","otherwise",".","Return","None","if","`","type1","`",",","`","type2","`","have","different","rank","or","non-tensor","type","."]
code: def get_compat_shape(type1, type2):
      """
      For tensor types `type1`, `type2` that are of the same rank, return
      compat_shape (python list) where compat_shape[i] is integer iff type1
      and type2 have the same integer shape on dim i. compat_shape[i] is
      symbolic otherwise.
  
      Return None if `type1`, `type2` have different rank or non-tensor
      type.
      """
      if not types.is_tensor(type1) or not types.is_tensor(type2):
          return None
  
      s1 = type1.get_shape()
      s2 = type2.get_shape()
  
      if len(s1) != len(s2):
          return None
  
      compat_shape = []
      for d1, d2 in zip(s1, s2):
          if d1 != d2:
              compat_shape.append(get_new_symbol())
          else:
              compat_shape.append(d1)
      return compat_shape
  
imports: import six
  from coremltools.converters.mil.mil import types
  from coremltools.converters.mil.mil.types.type_mapping import numpy_val_to_builtin_val, is_subtype
  import copy
  from coremltools.converters.mil.mil import Block, SYMBOL, NONE
  from coremltools.converters.mil.mil.var import Var
  from coremltools.converters.mil.mil import get_new_symbol
  from ._op_reqs import *
  import logging
label_desc: Use image node_id 7 for calling the while_loop obj's underlying member method code with example usage: obj.get_compat_shape(type1, type2) and returns: compat_shape, None, None