def validate_annotated_heatmap(z, x, y, annotation_text):
 if ((annotation_text is not None) and isinstance(annotation_text, list)):
  utils.validate_equal_length(z, annotation_text)
  for lst in range(len(z)):
   if (len(z[lst]) != len(annotation_text[lst])):
    raise exceptions.PlotlyError('z and text should have the same dimensions')
 if x:
  if (len(x) != len(z[0])):
   raise exceptions.PlotlyError('oops, the x list that you provided does not match the width of your z matrix ')
 if y:
  if (len(y) != len(z)):
   raise exceptions.PlotlyError('oops, the y list that you provided does not match the length of your z matrix ')

def validate_annotated_heatmap ( z , x , y , annotation_text ) : if ( ( annotation_text is not None ) and isinstance ( annotation_text , list ) ) : utils . validate_equal_length ( z , annotation_text ) for lst in range ( len ( z ) ) : if ( len ( z [ lst ] ) != len ( annotation_text [ lst ] ) ) : raise exceptions . PlotlyError ( 'z and text should have the same dimensions' ) if x : if ( len ( x ) != len ( z [ 0 ] ) ) : raise exceptions . PlotlyError ( 'oops, the x list that you provided does not match the width of your z matrix ' ) if y : if ( len ( y ) != len ( z ) ) : raise exceptions . PlotlyError ( 'oops, the y list that you provided does not match the length of your z matrix ' )
annotated-heatmap-specific validations check that if a text matrix is supplied .