def _two_element_tuple(int_or_tuple):
 if isinstance(int_or_tuple, (list, tuple)):
  if (len(int_or_tuple) != 2):
   raise ValueError(('Must be a list with 2 elements: %s' % int_or_tuple))
  return (int(int_or_tuple[0]), int(int_or_tuple[1]))
 if isinstance(int_or_tuple, int):
  return (int(int_or_tuple), int(int_or_tuple))
 if isinstance(int_or_tuple, tf.TensorShape):
  if (len(int_or_tuple) == 2):
   return (int_or_tuple[0], int_or_tuple[1])
 raise ValueError('Must be an int, a list with 2 elements or a TensorShape of length 2')

def _two_element_tuple ( int_or_tuple ) : if isinstance ( int_or_tuple , ( list , tuple ) ) : if ( len ( int_or_tuple ) != 2 ) : raise ValueError ( ( 'Must be a list with 2 elements: %s' % int_or_tuple ) ) return ( int ( int_or_tuple [ 0 ] ) , int ( int_or_tuple [ 1 ] ) ) if isinstance ( int_or_tuple , int ) : return ( int ( int_or_tuple ) , int ( int_or_tuple ) ) if isinstance ( int_or_tuple , tf . TensorShape ) : if ( len ( int_or_tuple ) == 2 ) : return ( int_or_tuple [ 0 ] , int_or_tuple [ 1 ] ) raise ValueError ( 'Must be an int, a list with 2 elements or a TensorShape of length 2' )
converts int_or_tuple to height .